Go to the source code of this file.
|
| waitForExplicitFinish () |
|
function | add_visit (aURI, aDate) |
|
function | add_bookmark (aURI) |
|
function | make_test_report (testName, result, units) |
|
ptests | push ({name:"open_bookmarks_sidebar", times:[], run:function(){var self=this;var start=Date.now();var sb=document.getElementById("sidebar");sb.addEventListener("load", function(){var duration=Date.now()-start;sb.removeEventListener("load", arguments.callee, true);toggleSidebar("viewBookmarksSidebar", false);self.times.push(duration);if(self.times.length==TEST_REPEAT_COUNT) self.finish();elseself.run();}, true);toggleSidebar("viewBookmarksSidebar", true);}, finish:function(){this.times.sort();this.times.pop();this.times.shift();var totalDuration=this.times.reduce(function(time, total){return time+total;});var avgDuration=totalDuration/this.times.length;var report=make_test_report("open_bookmarks_sidebar", avgDuration);ok(true, report);runNextTest();}}) |
|
function | test () |
|
function | runNextTest () |
|
function add_bookmark |
( |
|
aURI | ) |
|
function add_visit |
( |
|
aURI, |
|
|
|
aDate |
|
) |
| |
function make_test_report |
( |
|
testName, |
|
|
|
result, |
|
|
|
units |
|
) |
| |
ptests push |
( |
{name:"open_bookmarks_sidebar", times:[], run:function(){var self=this;var start=Date.now();var sb=document.getElementById("sidebar");sb.addEventListener("load", function(){var duration=Date.now()-start;sb.removeEventListener("load", arguments.callee, true);toggleSidebar("viewBookmarksSidebar", false);self.times.push(duration);if(self.times.length==TEST_REPEAT_COUNT) self.finish();elseself.run();}, true);toggleSidebar("viewBookmarksSidebar", true);}, finish:function(){this.times.sort();this.times.pop();this.times.shift();var totalDuration=this.times.reduce(function(time, total){return time+total;});var avgDuration=totalDuration/this.times.length;var report=make_test_report("open_bookmarks_sidebar", avgDuration);ok(true, report);runNextTest();}} |
| ) |
|
waitForExplicitFinish |
( |
| ) |
|
const Cc = Components.classes |
const Cr = Components.results |
const TEST_IDENTIFIER = "ui-perf-test" |
const TEST_REPEAT_COUNT = 10 |
const TEST_SUITE = "places" |