Go to the source code of this file.
Functions | |
gTests | push ({desc:"Bug 430148 - Remove or hide the more/less button in details pane...", run:function(){var PO=gLibrary.PlacesOrganizer;var infoBoxExpanderWrapper=getAndCheckElmtById("infoBoxExpanderWrapper");var bhist=PlacesUtils.history.QueryInterface(Ci.nsIBrowserHistory);PlacesUtils.history.addVisit(PlacesUtils._uri(TEST_URI), Date.now()*1000, null, PlacesUtils.history.TRANSITION_TYPED, false, 0);ok(bhist.isVisited(PlacesUtils._uri(TEST_URI)),"Visit has been added.");PO.selectLeftPaneQuery("AllBookmarks");isnot(PO._places.selectedNode, null,"Correctly selected all bookmarks node.");checkInfoBoxSelected(PO);ok(infoBoxExpanderWrapper.hidden,"Expander button is hidden for all bookmarks node.");checkAddInfoFieldsCollapsed(PO);PO.selectLeftPaneQuery("History");isnot(PO._places.selectedNode, null,"Correctly selected history node.");checkInfoBoxSelected(PO);ok(infoBoxExpanderWrapper.hidden,"Expander button is hidden for history node.");checkAddInfoFieldsCollapsed(PO);var historyNode=PO._places.selectedNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);historyNode.containerOpen=true;var childNode=historyNode.getChild(0);isnot(childNode, null,"History node first child is not null.");PO._places.selectNode(childNode);checkInfoBoxSelected(PO);ok(infoBoxExpanderWrapper.hidden,"Expander button is hidden for history child node.");checkAddInfoFieldsCollapsed(PO);var view=PO._content.treeBoxObject.view;ok(view.rowCount > 0,"History item exists.");view.selection.select(0);ok(infoBoxExpanderWrapper.hidden,"Expander button is hidden for history item.");checkAddInfoFieldsCollapsed(PO);historyNode.containerOpen=false;PO.selectLeftPaneQuery("BookmarksMenu");isnot(PO._places.selectedNode, null,"Correctly selected bookmarks menu node.");checkInfoBoxSelected(PO);ok(infoBoxExpanderWrapper.hidden,"Expander button is hidden for bookmarks menu node.");checkAddInfoFieldsCollapsed(PO);var menuNode=PO._places.selectedNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);menuNode.containerOpen=true;childNode=menuNode.getChild(0);isnot(childNode, null,"Bookmarks menu child node exists.");var recentlyBookmarkedTitle=PlacesUIUtils.getString("recentlyBookmarkedTitle");isnot(recentlyBookmarkedTitle, null,"Correctly got the recently bookmarked title locale string.");is(childNode.title, recentlyBookmarkedTitle,"Correctly selected recently bookmarked node.");PO._places.selectNode(childNode);checkInfoBoxSelected(PO);ok(!infoBoxExpanderWrapper.hidden,"Expander button is not hidden for recently bookmarked node.");checkAddInfoFieldsNotCollapsed(PO);var view=PO._content.treeBoxObject.view;ok(view.rowCount > 0,"Bookmark item exists.");view.selection.select(0);checkInfoBoxSelected(PO);ok(!infoBoxExpanderWrapper.hidden,"Expander button is not hidden for bookmark item.");checkAddInfoFieldsNotCollapsed(PO);checkAddInfoFields(PO,"bookmark item");ok(view.rowCount > 1,"Second bookmark item exists.");view.selection.select(1);checkInfoBoxSelected(PO);ok(!infoBoxExpanderWrapper.hidden,"Expander button is not hidden for second bookmark item.");checkAddInfoFieldsNotCollapsed(PO);checkAddInfoFields(PO,"second bookmark item");menuNode.containerOpen=false;bhist.removeAllPages();nextTest();}}) |
function | checkInfoBoxSelected (PO) |
function | checkAddInfoFieldsCollapsed (PO) |
function | checkAddInfoFieldsNotCollapsed (PO) |
function | checkAddInfoFields (PO, nodeName) |
function | getAndCheckElmtById (id) |
function | nextTest () |
function | test () |
Variables | |
const | TEST_URI = "http://www.mozilla.org/" |
var | gTests = [] |
var | gLibrary |
var | ww |
var | windowObserver |
function checkAddInfoFields | ( | PO, | |
nodeName | |||
) |
Definition at line 173 of file browser_library_infoBox.js.
function checkAddInfoFieldsCollapsed | ( | PO | ) |
Definition at line 160 of file browser_library_infoBox.js.
function checkAddInfoFieldsNotCollapsed | ( | PO | ) |
Definition at line 167 of file browser_library_infoBox.js.
function checkInfoBoxSelected | ( | PO | ) |
Definition at line 154 of file browser_library_infoBox.js.
function getAndCheckElmtById | ( | id | ) |
Definition at line 196 of file browser_library_infoBox.js.
function nextTest | ( | ) |
Definition at line 204 of file browser_library_infoBox.js.
gTests push | ( | {desc:"Bug 430148 - Remove or hide the more/less button in details pane...", run:function(){var PO=gLibrary.PlacesOrganizer;var infoBoxExpanderWrapper=getAndCheckElmtById("infoBoxExpanderWrapper");var bhist=PlacesUtils.history.QueryInterface(Ci.nsIBrowserHistory);PlacesUtils.history.addVisit(PlacesUtils._uri(TEST_URI), Date.now()*1000, null, PlacesUtils.history.TRANSITION_TYPED, false, 0);ok(bhist.isVisited(PlacesUtils._uri(TEST_URI)),"Visit has been added.");PO.selectLeftPaneQuery("AllBookmarks");isnot(PO._places.selectedNode, null,"Correctly selected all bookmarks node.");checkInfoBoxSelected(PO);ok(infoBoxExpanderWrapper.hidden,"Expander button is hidden for all bookmarks node.");checkAddInfoFieldsCollapsed(PO);PO.selectLeftPaneQuery("History");isnot(PO._places.selectedNode, null,"Correctly selected history node.");checkInfoBoxSelected(PO);ok(infoBoxExpanderWrapper.hidden,"Expander button is hidden for history node.");checkAddInfoFieldsCollapsed(PO);var historyNode=PO._places.selectedNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);historyNode.containerOpen=true;var childNode=historyNode.getChild(0);isnot(childNode, null,"History node first child is not null.");PO._places.selectNode(childNode);checkInfoBoxSelected(PO);ok(infoBoxExpanderWrapper.hidden,"Expander button is hidden for history child node.");checkAddInfoFieldsCollapsed(PO);var view=PO._content.treeBoxObject.view;ok(view.rowCount > 0,"History item exists.");view.selection.select(0);ok(infoBoxExpanderWrapper.hidden,"Expander button is hidden for history item.");checkAddInfoFieldsCollapsed(PO);historyNode.containerOpen=false;PO.selectLeftPaneQuery("BookmarksMenu");isnot(PO._places.selectedNode, null,"Correctly selected bookmarks menu node.");checkInfoBoxSelected(PO);ok(infoBoxExpanderWrapper.hidden,"Expander button is hidden for bookmarks menu node.");checkAddInfoFieldsCollapsed(PO);var menuNode=PO._places.selectedNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);menuNode.containerOpen=true;childNode=menuNode.getChild(0);isnot(childNode, null,"Bookmarks menu child node exists.");var recentlyBookmarkedTitle=PlacesUIUtils.getString("recentlyBookmarkedTitle");isnot(recentlyBookmarkedTitle, null,"Correctly got the recently bookmarked title locale string.");is(childNode.title, recentlyBookmarkedTitle,"Correctly selected recently bookmarked node.");PO._places.selectNode(childNode);checkInfoBoxSelected(PO);ok(!infoBoxExpanderWrapper.hidden,"Expander button is not hidden for recently bookmarked node.");checkAddInfoFieldsNotCollapsed(PO);var view=PO._content.treeBoxObject.view;ok(view.rowCount > 0,"Bookmark item exists.");view.selection.select(0);checkInfoBoxSelected(PO);ok(!infoBoxExpanderWrapper.hidden,"Expander button is not hidden for bookmark item.");checkAddInfoFieldsNotCollapsed(PO);checkAddInfoFields(PO,"bookmark item");ok(view.rowCount > 1,"Second bookmark item exists.");view.selection.select(1);checkInfoBoxSelected(PO);ok(!infoBoxExpanderWrapper.hidden,"Expander button is not hidden for second bookmark item.");checkAddInfoFieldsNotCollapsed(PO);checkAddInfoFields(PO,"second bookmark item");menuNode.containerOpen=false;bhist.removeAllPages();nextTest();}} | ) |
function test | ( | ) |
Definition at line 238 of file browser_library_infoBox.js.
var gLibrary |
Definition at line 45 of file browser_library_infoBox.js.
var gTests = [] |
Definition at line 44 of file browser_library_infoBox.js.
const TEST_URI = "http://www.mozilla.org/" |
Test appropriate visibility of infoBoxExpanderWrapper and additionalInfoFields in infoBox section of library
Definition at line 42 of file browser_library_infoBox.js.
var windowObserver |
Definition at line 222 of file browser_library_infoBox.js.
var ww |
Definition at line 219 of file browser_library_infoBox.js.