Changes

Jump to: navigation, search

Contribute to Private Browsing Tests

648 bytes added, 20:33, 26 September 2008
m
History Unit Test
** Wrote a new function that creates a handful of history items with various visit types.
{|class="collapsible" style="background: #c0c0c0" width="80%"
!Always displayed headertest_248970_history - Function fill_history()
|-
| <pre>var dayLabels = [ "Today", "Yesterday", "2 days ago", "3 days ago", "4 days ago", "5 days ago", "6 days ago", "Older than 6 days"];/** Optionally displayed text* Function fills history and checks if date labels Optionally displayed text* are correct for partially filled history Optionally displayed text * Optionally displayed text * @returns nothing Optionally displayed text!!!!!*/ Optionally displayed text 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>
|}
1
edit

Navigation menu