From 6a9d09a3f8115e4c0bac81b6bb546a395c72b597 Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Wed, 1 Apr 2009 19:11:18 +0200 Subject: [PATCH] test for Bug 427633 - Disable creating a New Folder in the bookmarks dialogs if insertionPoint is invalid, r=dietrich --- .../places/content/editBookmarkOverlay.js | 5 +- .../places/tests/chrome/Makefile.in | 1 + .../test_bug427633_no_newfolder_if_noip.xul | 123 ++++++++++++++++++ 3 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 browser/components/places/tests/chrome/test_bug427633_no_newfolder_if_noip.xul diff --git a/browser/components/places/content/editBookmarkOverlay.js b/browser/components/places/content/editBookmarkOverlay.js index da5ea9d59805..d55e5cfb4d11 100644 --- a/browser/components/places/content/editBookmarkOverlay.js +++ b/browser/components/places/content/editBookmarkOverlay.js @@ -228,7 +228,6 @@ var gEditItemOverlay = { // tags selector this._rebuildTagsSelectorList(); - this._initialized = true; } // name picker @@ -243,6 +242,8 @@ var gEditItemOverlay = { window.addEventListener("unload", this, false); this._observersAdded = true; } + + this._initialized = true; }, _getCommonTags: function(aArrIndex) { @@ -809,7 +810,7 @@ var gEditItemOverlay = { // breaks the view. const FOLDER_TREE_PLACE_URI = "place:excludeItems=1&excludeQueries=1&excludeReadOnlyFolders=1&folder=" + - window.top.PlacesUIUtils.allBookmarksFolderId; + PlacesUIUtils.allBookmarksFolderId; this._folderTree.place = FOLDER_TREE_PLACE_URI; this._element("chooseFolderSeparator").hidden = diff --git a/browser/components/places/tests/chrome/Makefile.in b/browser/components/places/tests/chrome/Makefile.in index 4f2fa1a1a2da..aa341625bdf5 100644 --- a/browser/components/places/tests/chrome/Makefile.in +++ b/browser/components/places/tests/chrome/Makefile.in @@ -46,6 +46,7 @@ include $(topsrcdir)/config/rules.mk _CHROME_TEST_FILES = \ test_treeview_date.xul \ test_bug485100-change-case-loses-tag.xul \ + test_bug427633_no_newfolder_if_noip.xul \ $(NULL) libs:: $(_CHROME_TEST_FILES) diff --git a/browser/components/places/tests/chrome/test_bug427633_no_newfolder_if_noip.xul b/browser/components/places/tests/chrome/test_bug427633_no_newfolder_if_noip.xul new file mode 100644 index 000000000000..cea8d745a68b --- /dev/null +++ b/browser/components/places/tests/chrome/test_bug427633_no_newfolder_if_noip.xul @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + %editBookmarkOverlayDTD; +]> + + + + + +