browser_ui_bookmarks_sidebar.js File Reference

Go to the source code of this file.

Functions

 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 ()
 

Variables

const TEST_IDENTIFIER = "ui-perf-test"
 
const TEST_SUITE = "places"
 
const Cc = Components.classes
 
const Ci = Components.interfaces
 
const Cr = Components.results
 
var wm
 
var win = wm.getMostRecentWindow("navigator:browser")
 
var ios
 
var hs
 
var bs
 
var ptests = []
 
const TEST_REPEAT_COUNT = 10
 

Function Documentation

function add_bookmark (   aURI)

Definition at line 74 of file browser_ui_bookmarks_sidebar.js.

function add_visit (   aURI,
  aDate 
)

Definition at line 64 of file browser_ui_bookmarks_sidebar.js.

function make_test_report (   testName,
  result,
  units 
)

Definition at line 80 of file browser_ui_bookmarks_sidebar.js.

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 runNextTest ( )

Definition at line 128 of file browser_ui_bookmarks_sidebar.js.

Here is the caller graph for this function:

function test ( )

Definition at line 123 of file browser_ui_bookmarks_sidebar.js.

Here is the call graph for this function:

waitForExplicitFinish ( )

Variable Documentation

var bs
Initial value:
= Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
getService(Ci.nsINavBookmarksService)
getService(Ci.sbIFaceplateManager)

Definition at line 61 of file browser_ui_bookmarks_sidebar.js.

const Cc = Components.classes

Definition at line 49 of file browser_ui_bookmarks_sidebar.js.

Definition at line 50 of file browser_ui_bookmarks_sidebar.js.

const Cr = Components.results

Definition at line 51 of file browser_ui_bookmarks_sidebar.js.

var hs
Initial value:
= Cc["@mozilla.org/browser/nav-history-service;1"].
getService(Ci.nsINavHistoryService)
getService(Ci.sbIFaceplateManager)

Definition at line 59 of file browser_ui_bookmarks_sidebar.js.

var ios
Initial value:
= Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService)
getService(Ci.sbIFaceplateManager)

Definition at line 57 of file browser_ui_bookmarks_sidebar.js.

var ptests = []

Definition at line 85 of file browser_ui_bookmarks_sidebar.js.

const TEST_IDENTIFIER = "ui-perf-test"

Definition at line 46 of file browser_ui_bookmarks_sidebar.js.

const TEST_REPEAT_COUNT = 10

Definition at line 89 of file browser_ui_bookmarks_sidebar.js.

const TEST_SUITE = "places"

Definition at line 47 of file browser_ui_bookmarks_sidebar.js.

var win = wm.getMostRecentWindow("navigator:browser")

Definition at line 55 of file browser_ui_bookmarks_sidebar.js.

var wm
Initial value:
= Cc["@mozilla.org/appshell/window-mediator;1"].
getService(Ci.nsIWindowMediator)
getService(Ci.sbIFaceplateManager)

Definition at line 53 of file browser_ui_bookmarks_sidebar.js.