browser_views_liveupdate.js File Reference

Go to the source code of this file.

Functions

function test ()
 
function fakeOpenPopup (aPopup)
 
function startTest ()
 
function finishTest ()
 
function searchItemInView (aItemId, aView)
 
function getNodeForToolbarItem (aItemId)
 
function getNodeForMenuItem (aItemId)
 
function getNodeForSidebarItem (aItemId)
 
function getViewsForFolder (aFolderId)
 

Variables

const Cc = Components.classes
 
const Ci = Components.interfaces
 
var bookmarksObserver
 

Function Documentation

function fakeOpenPopup (   aPopup)

Simulates popup opening causing it to populate. We cannot just use menu.open, since it would not work on Mac due to native menubar.

Definition at line 71 of file browser_views_liveupdate.js.

Here is the caller graph for this function:

function finishTest ( )

Restores browser state and calls finish.

Definition at line 186 of file browser_views_liveupdate.js.

Here is the caller graph for this function:

function getNodeForMenuItem (   aItemId)

Get places node and index for an itemId in bookmarks menu view.

Parameters
aItemIditem id of the item to search.
Returns
[node, index] or [null, null] if not found.

Definition at line 340 of file browser_views_liveupdate.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function getNodeForSidebarItem (   aItemId)

Get places node and index for an itemId in sidebar tree view.

Parameters
aItemIditem id of the item to search.
Returns
[node, index] or [null, null] if not found.

Definition at line 382 of file browser_views_liveupdate.js.

Here is the caller graph for this function:

function getNodeForToolbarItem (   aItemId)

Get places node and index for an itemId in bookmarks toolbar view.

Parameters
aItemIditem id of the item to search.
Returns
[node, index] or [null, null] if not found.

Definition at line 299 of file browser_views_liveupdate.js.

Here is the caller graph for this function:

function getViewsForFolder (   aFolderId)

Get views affected by changes to a folder.

Parameters
aFolderIditem id of the folder we have changed.
Returns
a subset of views: ["toolbar", "menu", "sidebar"]

Definition at line 441 of file browser_views_liveupdate.js.

function searchItemInView (   aItemId,
  aView 
)

Search an item id in a view.

Parameters
aItemIditem id of the item to search.
aVieweither "toolbar", "menu" or "sidebar"
Returns
[node, index] or [null, null] if not found.

Definition at line 279 of file browser_views_liveupdate.js.

Here is the call graph for this function:

function startTest ( )

Adds bookmarks observer, and executes a bunch of bookmarks operations.

Definition at line 82 of file browser_views_liveupdate.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function test ( )

Definition at line 45 of file browser_views_liveupdate.js.

Here is the call graph for this function:

Variable Documentation

var bookmarksObserver

The observer is where magic happens, for every change we do it will look for nodes positions in the affected views.

Definition at line 197 of file browser_views_liveupdate.js.

const Cc = Components.classes

Tests Places views (menu, toolbar, tree) for liveupdate.

Definition at line 42 of file browser_views_liveupdate.js.

Definition at line 43 of file browser_views_liveupdate.js.