Open main menu

CDOT Wiki β

Changes

Contribute to Private Browsing Tests

866 bytes added, 19:25, 26 September 2008
m
History Unit Test
* [[User:AaronMT|AaronMT]] 23:45, 26 September 2008 (UTC)
** Wrote a new function that creates a handful of history items with various visit types.
{| class="collapsible prettytable"
!Function - fillHistory()
|-
|
<pre>
var dayLabels =
[
"Today",
"Yesterday",
"2 days ago",
"3 days ago",
"4 days ago",
"5 days ago",
"6 days ago",
"Older than 6 days"
];
 
 
/**
* Function fills history and checks if date labels
* are correct for partially filled history
*
* @returns nothing
*/
 
function fill_history() {
const checkOlderOffset = 4;
 
// add visits for the older days
for (var i=checkOlderOffset; i<dayLabels.length; i++)
{
var testURI = uri("http://mirror"+i+".mozilla.com/b");
add_visit(testURI, -i);
var testURI = uri("https://mirror"+i+".mozilla.com/a");
add_visit(testURI, -i);
var testURI = uri("ftp://mirror"+i+".google.com/b");
add_visit(testURI, -i);
var testURI = uri("http://mirror"+i+".google.com/a");
add_visit(testURI, -i);
}
}</pre>
== Project Weekly TODO ==
1
edit