Changes

Jump to: navigation, search

Contribute to Private Browsing Tests

868 bytes removed, 20:25, 26 September 2008
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

Navigation menu