browser_bookmarksProperties.js File Reference

Go to the source code of this file.

Functions

function add_visit (aURI, aDate)
 
function add_bookmark (aURI)
 
gTests push ({desc:"Bug 479348 - Properties on a root should be read-only", sidebar:SIDEBAR_BOOKMARKS_ID, action:ACTION_EDIT, itemType:null, window:null, setup:function(){}, selectNode:function(tree){var itemId=PlacesUIUtils.leftPaneQueries["UnfiledBookmarks"];tree.selectItems([itemId]);this.selectedNode=tree.selectedNode;}, run:function(){ok(this.window.BookmarkPropertiesPanel._readOnly,"Dialog is read-only");var acceptButton=this.window.document.documentElement.getButton("accept");ok(acceptButton.disabled,"Accept button is disabled");var namepicker=this.window.document.getElementById("editBMPanel_namePicker");ok(namepicker.readOnly,"Name field is disabled");is(namepicker.value, PlacesUtils.bookmarks.getItemTitle(PlacesUtils.unfiledBookmarksFolderId),"Node title is correct");this.window.gEditItemOverlay.onNamePickerChange();is(namepicker.value, PlacesUtils.bookmarks.getItemTitle(PlacesUtils.unfiledBookmarksFolderId),"Root title is correct");is(PlacesUtils.bookmarks.getItemTitle(this.selectedNode.itemId), null,"Shortcut title is null");this.finish();}, finish:function(){this.window.document.documentElement.cancelDialog();toggleSidebar(this.sidebar, false);runNextTest();}, cleanup:function(){}})
 
function test ()
 
function runNextTest ()
 
function execute_test_in_sidebar ()
 
function open_properties_dialog ()
 

Variables

const Cc = Components.classes
 
const Ci = Components.interfaces
 
const SIDEBAR_HISTORY_TREE_ID = "historyTree"
 
const SIDEBAR_BOOKMARKS_TREE_ID = "bookmarks-view"
 
const SIDEBAR_HISTORY_ID = "viewHistorySidebar"
 
const SIDEBAR_BOOKMARKS_ID = "viewBookmarksSidebar"
 
const SIDEBAR_HISTORY_BYLASTVISITED_VIEW = "bylastvisited"
 
const SIDEBAR_HISTORY_BYMOSTVISITED_VIEW = "byvisited"
 
const SIDEBAR_HISTORY_BYDATE_VIEW = "byday"
 
const SIDEBAR_HISTORY_BYSITE_VIEW = "bysite"
 
const SIDEBAR_HISTORY_BYDATEANDSITE_VIEW = "bydateandsite"
 
const ACTION_EDIT = 0
 
const ACTION_ADD = 1
 
const TYPE_FOLDER = 0
 
const TYPE_BOOKMARK = 1
 
const TEST_URL = "http://www.mozilla.org/"
 
const DIALOG_URL = "chrome://browser/content/places/bookmarkProperties.xul"
 
const DIALOG_URL_MINIMAL_UI = "chrome://browser/content/places/bookmarkProperties2.xul"
 
var wm
 
var win = wm.getMostRecentWindow("navigator:browser")
 
var ww
 
var gTests = []
 
var gCurrentTest = null
 

Function Documentation

function add_bookmark (   aURI)

Definition at line 90 of file browser_bookmarksProperties.js.

function add_visit (   aURI,
  aDate 
)

Definition at line 79 of file browser_bookmarksProperties.js.

function execute_test_in_sidebar ( )

Global functions to run a test in Properties dialog context.

Definition at line 574 of file browser_bookmarksProperties.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function open_properties_dialog ( )

Definition at line 584 of file browser_bookmarksProperties.js.

Here is the caller graph for this function:

tests push ( {desc:"Bug 479348 - Properties on a root should be read-only", sidebar:SIDEBAR_BOOKMARKS_ID, action:ACTION_EDIT, itemType:null, window:null, setup:function(){}, selectNode:function(tree){var itemId=PlacesUIUtils.leftPaneQueries["UnfiledBookmarks"];tree.selectItems([itemId]);this.selectedNode=tree.selectedNode;}, run:function(){ok(this.window.BookmarkPropertiesPanel._readOnly,"Dialog is read-only");var acceptButton=this.window.document.documentElement.getButton("accept");ok(acceptButton.disabled,"Accept button is disabled");var namepicker=this.window.document.getElementById("editBMPanel_namePicker");ok(namepicker.readOnly,"Name field is disabled");is(namepicker.value, PlacesUtils.bookmarks.getItemTitle(PlacesUtils.unfiledBookmarksFolderId),"Node title is correct");this.window.gEditItemOverlay.onNamePickerChange();is(namepicker.value, PlacesUtils.bookmarks.getItemTitle(PlacesUtils.unfiledBookmarksFolderId),"Root title is correct");is(PlacesUtils.bookmarks.getItemTitle(this.selectedNode.itemId), null,"Shortcut title is null");this.finish();}, finish:function(){this.window.document.documentElement.cancelDialog();toggleSidebar(this.sidebar, false);runNextTest();}, cleanup:function(){}}  )
function runNextTest ( )

Definition at line 547 of file browser_bookmarksProperties.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function test ( )

Definition at line 537 of file browser_bookmarksProperties.js.

Here is the call graph for this function:

Variable Documentation

const ACTION_ADD = 1

Definition at line 61 of file browser_bookmarksProperties.js.

const ACTION_EDIT = 0

Definition at line 60 of file browser_bookmarksProperties.js.

const Cc = Components.classes

Tests the bookmarks Properties dialog.

Definition at line 42 of file browser_bookmarksProperties.js.

Definition at line 43 of file browser_bookmarksProperties.js.

const DIALOG_URL = "chrome://browser/content/places/bookmarkProperties.xul"

Definition at line 70 of file browser_bookmarksProperties.js.

const DIALOG_URL_MINIMAL_UI = "chrome://browser/content/places/bookmarkProperties2.xul"

Definition at line 71 of file browser_bookmarksProperties.js.

var gCurrentTest = null

Definition at line 101 of file browser_bookmarksProperties.js.

var gTests = []

Definition at line 100 of file browser_bookmarksProperties.js.

const SIDEBAR_BOOKMARKS_ID = "viewBookmarksSidebar"

Definition at line 50 of file browser_bookmarksProperties.js.

const SIDEBAR_BOOKMARKS_TREE_ID = "bookmarks-view"

Definition at line 47 of file browser_bookmarksProperties.js.

const SIDEBAR_HISTORY_BYDATE_VIEW = "byday"

Definition at line 55 of file browser_bookmarksProperties.js.

const SIDEBAR_HISTORY_BYDATEANDSITE_VIEW = "bydateandsite"

Definition at line 57 of file browser_bookmarksProperties.js.

const SIDEBAR_HISTORY_BYLASTVISITED_VIEW = "bylastvisited"

Definition at line 53 of file browser_bookmarksProperties.js.

const SIDEBAR_HISTORY_BYMOSTVISITED_VIEW = "byvisited"

Definition at line 54 of file browser_bookmarksProperties.js.

const SIDEBAR_HISTORY_BYSITE_VIEW = "bysite"

Definition at line 56 of file browser_bookmarksProperties.js.

const SIDEBAR_HISTORY_ID = "viewHistorySidebar"

Definition at line 49 of file browser_bookmarksProperties.js.

const SIDEBAR_HISTORY_TREE_ID = "historyTree"

Definition at line 46 of file browser_bookmarksProperties.js.

const TEST_URL = "http://www.mozilla.org/"

Definition at line 68 of file browser_bookmarksProperties.js.

const TYPE_BOOKMARK = 1

Definition at line 66 of file browser_bookmarksProperties.js.

const TYPE_FOLDER = 0

Definition at line 65 of file browser_bookmarksProperties.js.

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

Definition at line 75 of file browser_bookmarksProperties.js.

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

Definition at line 73 of file browser_bookmarksProperties.js.

var ww
Initial value:
= Cc["@mozilla.org/embedcomp/window-watcher;1"].
getService(Ci.nsIWindowWatcher)
getService(Ci.sbIFaceplateManager)

Definition at line 76 of file browser_bookmarksProperties.js.