Bug 1444228 - Remove editBookmarkOverlay.xul. r=Standard8 draft
authorBrendan Dahl <brendan.dahl@gmail.com>
Fri, 16 Mar 2018 09:26:49 -0700
changeset 768672 90de3ac73894b6942692dd9c6fad6c08ea2d2fb7
parent 768523 47e1787284fbfad3d32eb7081ffdda58d2b086de
push id102954
push userbmo:bdahl@mozilla.com
push dateFri, 16 Mar 2018 17:36:05 +0000
reviewersStandard8
bugs1444228
milestone61.0a1
Bug 1444228 - Remove editBookmarkOverlay.xul. r=Standard8 Move the main contents of editBookmarkOverlay.xul into an include file and inline the DTD and CSS files where used. Convert several chrome tests to browser tests since the preprocessor is hard to use within the testing framework. MozReview-Commit-ID: DpPBOpZSuBN
browser/base/content/browser-doctype.inc
browser/base/content/browser-places.js
browser/base/content/browser.js
browser/base/content/browser.xul
browser/components/places/content/bookmarkProperties.js
browser/components/places/content/bookmarkProperties.xul
browser/components/places/content/editBookmark.js
browser/components/places/content/editBookmarkOverlay.js
browser/components/places/content/editBookmarkOverlay.xul
browser/components/places/content/editBookmarkPanel.inc.xul
browser/components/places/content/places.js
browser/components/places/content/places.xul
browser/components/places/jar.mn
browser/components/places/tests/browser/browser.ini
browser/components/places/tests/browser/browser_bug427633_no_newfolder_if_noip.js
browser/components/places/tests/browser/browser_bug485100-change-case-loses-tag.js
browser/components/places/tests/browser/browser_bug631374_tags_selector_scroll.js
browser/components/places/tests/browser/browser_editBookmark_keywords.js
browser/components/places/tests/browser/browser_editBookmark_tags_liveUpdate.js
browser/components/places/tests/chrome/chrome.ini
browser/components/places/tests/chrome/test_bug427633_no_newfolder_if_noip.xul
browser/components/places/tests/chrome/test_bug485100-change-case-loses-tag.xul
browser/components/places/tests/chrome/test_bug631374_tags_selector_scroll.xul
browser/components/places/tests/chrome/test_editBookmarkOverlay_keywords.xul
browser/components/places/tests/chrome/test_editBookmarkOverlay_tags_liveUpdate.xul
browser/themes/linux/jar.mn
browser/themes/linux/places/editBookmark.css
browser/themes/linux/places/editBookmarkOverlay.css
browser/themes/osx/browser.css
browser/themes/osx/jar.mn
browser/themes/osx/places/editBookmark.css
browser/themes/osx/places/editBookmarkOverlay.css
browser/themes/windows/jar.mn
browser/themes/windows/places/editBookmark.css
browser/themes/windows/places/editBookmarkOverlay.css
tools/lint/eslint/eslint-plugin-mozilla/lib/environments/browser-window.js
--- a/browser/base/content/browser-doctype.inc
+++ b/browser/base/content/browser-doctype.inc
@@ -16,10 +16,12 @@
 <!ENTITY % safebrowsingDTD SYSTEM "chrome://browser/locale/safebrowsing/phishing-afterload-warning-message.dtd">
 %safebrowsingDTD;
 <!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
 %aboutHomeDTD;
 <!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
 %syncBrandDTD;
 <!ENTITY % reportphishDTD SYSTEM "chrome://browser/locale/safebrowsing/report-phishing.dtd">
 %reportphishDTD;
+<!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
+%editBookmarkOverlayDTD;
 ]>
 
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -196,55 +196,41 @@ var StarUI = {
             }
           }, delay);
           this._autoCloseTimerEnabled = true;
         }
         break;
     }
   },
 
-  _overlayLoaded: false,
-  _overlayLoading: false,
+  _bookmarkPopupInitialized: false,
   async showEditBookmarkPopup(aNode, aAnchorElement, aPosition, aIsNewBookmark, aUrl) {
     // Slow double-clicks (not true double-clicks) shouldn't
     // cause the panel to flicker.
     if (this.panel.state == "showing" ||
         this.panel.state == "open") {
       return;
     }
 
     this._isNewBookmark = aIsNewBookmark;
     this._itemGuids = null;
 
-    // Performance: load the overlay the first time the panel is opened
-    // (see bug 392443).
-    if (this._overlayLoading)
-      return;
-
-    if (this._overlayLoaded) {
+    if (this._bookmarkPopupInitialized) {
       await this._doShowEditBookmarkPanel(aNode, aAnchorElement, aPosition, aUrl);
       return;
     }
+    this._bookmarkPopupInitialized = true;
+    // Move the header (star, title, button) into the grid,
+    // so that it aligns nicely with the other items (bug 484022).
+    let header = this._element("editBookmarkPanelHeader");
+    let rows = this._element("editBookmarkPanelGrid").lastChild;
+    rows.insertBefore(header, rows.firstChild);
+    header.hidden = false;
 
-    this._overlayLoading = true;
-    document.loadOverlay(
-      "chrome://browser/content/places/editBookmarkOverlay.xul",
-      (aSubject, aTopic, aData) => {
-        // Move the header (star, title, button) into the grid,
-        // so that it aligns nicely with the other items (bug 484022).
-        let header = this._element("editBookmarkPanelHeader");
-        let rows = this._element("editBookmarkPanelGrid").lastChild;
-        rows.insertBefore(header, rows.firstChild);
-        header.hidden = false;
-
-        this._overlayLoading = false;
-        this._overlayLoaded = true;
-        this._doShowEditBookmarkPanel(aNode, aAnchorElement, aPosition, aUrl);
-      }
-    );
+    await this._doShowEditBookmarkPanel(aNode, aAnchorElement, aPosition, aUrl);
   },
 
   async _doShowEditBookmarkPanel(aNode, aAnchorElement, aPosition, aUrl) {
     if (this.panel.state != "closed")
       return;
 
     this._blockCommands(); // un-done in the popuphidden handler
 
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -112,17 +112,17 @@ XPCOMUtils.defineLazyScriptGetter(this, 
                                          "DownloadsViewController",
                                          "DownloadsSummary", "DownloadsFooter",
                                          "DownloadsBlockedSubview"],
                                   "chrome://browser/content/downloads/downloads.js");
 XPCOMUtils.defineLazyScriptGetter(this, ["DownloadsButton",
                                          "DownloadsIndicatorView"],
                                   "chrome://browser/content/downloads/indicator.js");
 XPCOMUtils.defineLazyScriptGetter(this, "gEditItemOverlay",
-                                  "chrome://browser/content/places/editBookmarkOverlay.js");
+                                  "chrome://browser/content/places/editBookmark.js");
 if (AppConstants.NIGHTLY_BUILD) {
   XPCOMUtils.defineLazyScriptGetter(this, "gWebRender",
                                     "chrome://browser/content/browser-webrender.js");
 }
 
 // lazy service getters
 
 XPCOMUtils.defineLazyServiceGetters(this, {
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -8,16 +8,18 @@
 
 <?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/downloads/downloads.css"?>
 <?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/controlcenter/panel.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/customizableui/panelUI.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/downloads/downloads.css"?>
+<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
+<?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css"?>
 <?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/tabbrowser.css" type="text/css"?>
 
 # All DTD information is stored in a separate file so that it can be shared by
 # hiddenWindow.xul.
 #include browser-doctype.inc
 
 <window id="main-window"
@@ -218,17 +220,17 @@
         <vbox align="center">
           <image id="editBookmarkPanelStarIcon"/>
         </vbox>
         <vbox>
           <label id="editBookmarkPanelTitle"/>
           <description id="editBookmarkPanelDescription"/>
         </vbox>
       </row>
-      <vbox id="editBookmarkPanelContent" flex="1" hidden="true"/>
+#include ../../components/places/content/editBookmarkPanel.inc.xul
       <hbox id="editBookmarkPanelBottomButtons" pack="end">
 #ifndef XP_UNIX
         <button id="editBookmarkPanelDoneButton"
                 class="editBookmarkPanelBottomButton"
                 label="&editBookmark.done.label;"
                 default="true"
                 oncommand="StarUI.panel.hidePopup();"/>
         <button id="editBookmarkPanelRemoveButton"
--- a/browser/components/places/content/bookmarkProperties.js
+++ b/browser/components/places/content/bookmarkProperties.js
@@ -52,17 +52,17 @@
  *     - "tags"
  *     - "loadInSidebar"
  *     - "folderPicker" - hides both the tree and the menu.
  *
  * window.arguments[0].performed is set to true if any transaction has
  * been performed by the dialog.
  */
 
-/* import-globals-from editBookmarkOverlay.js */
+/* import-globals-from editBookmark.js */
 /* import-globals-from controller.js */
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils",
                                "resource://gre/modules/PrivateBrowsingUtils.jsm");
 
 const BOOKMARK_ITEM = 0;
 const BOOKMARK_FOLDER = 1;
--- a/browser/components/places/content/bookmarkProperties.xul
+++ b/browser/components/places/content/bookmarkProperties.xul
@@ -1,21 +1,19 @@
 <?xml version="1.0"?>
 
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://global/skin/"?>
-<?xml-stylesheet href="chrome://browser/skin/places/editBookmarkOverlay.css"?>
+<?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css"?>
 <?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
 <?xml-stylesheet href="chrome://browser/content/places/places.css"?>
 
-<?xul-overlay href="chrome://browser/content/places/editBookmarkOverlay.xul"?>
-
 <!DOCTYPE dialog [
   <!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
   %editBookmarkOverlayDTD;
 ]>
 
 <dialog id="bookmarkproperties"
         buttons="accept, cancel"
         buttoniconaccept="save"
@@ -28,17 +26,17 @@
         persist="screenX screenY width">
 
   <stringbundleset id="stringbundleset">
     <stringbundle id="stringBundle"
                   src="chrome://browser/locale/places/bookmarkProperties.properties"/>
   </stringbundleset>
 
   <script type="application/javascript"
-          src="chrome://browser/content/places/editBookmarkOverlay.js"/>
+          src="chrome://browser/content/places/editBookmark.js"/>
   <script type="application/javascript"
           src="chrome://browser/content/places/bookmarkProperties.js"/>
   <script type="application/javascript"
           src="chrome://global/content/globalOverlay.js"/>
   <script type="application/javascript"
           src="chrome://browser/content/utilityOverlay.js"/>
   <script type="application/javascript"><![CDATA[
     ChromeUtils.defineModuleGetter(window,
@@ -51,11 +49,11 @@
     ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
     XPCOMUtils.defineLazyScriptGetter(window, "PlacesTreeView",
       "chrome://browser/content/places/treeView.js");
     XPCOMUtils.defineLazyScriptGetter(window,
       ["PlacesInsertionPoint", "PlacesController", "PlacesControllerDragHelper"],
        "chrome://browser/content/places/controller.js");
   ]]></script>
 
-<vbox id="editBookmarkPanelContent"/>
+#include editBookmarkPanel.inc.xul
 
 </dialog>
rename from browser/components/places/content/editBookmarkOverlay.js
rename to browser/components/places/content/editBookmark.js
rename from browser/components/places/content/editBookmarkOverlay.xul
rename to browser/components/places/content/editBookmarkPanel.inc.xul
--- a/browser/components/places/content/editBookmarkOverlay.xul
+++ b/browser/components/places/content/editBookmarkPanel.inc.xul
@@ -1,188 +1,172 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!DOCTYPE overlay [
-<!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
-%editBookmarkOverlayDTD;
-]>
-
-<?xml-stylesheet href="chrome://browser/skin/places/editBookmarkOverlay.css"?>
-<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
-
-<overlay id="editBookmarkOverlay"
-         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+<vbox id="editBookmarkPanelContent" flex="1">
+  <hbox id="editBMPanel_selectionCount" pack="center">
+    <label id="editBMPanel_itemsCountText"/>
+  </hbox>
 
-  <vbox id="editBookmarkPanelContent" flex="1">
-    <hbox id="editBMPanel_selectionCount" pack="center">
-      <label id="editBMPanel_itemsCountText"/>
-    </hbox>
+  <grid id="editBookmarkPanelGrid" flex="1">
+    <columns id="editBMPanel_columns">
+      <column id="editBMPanel_labelColumn" />
+      <column flex="1" id="editBMPanel_editColumn" />
+    </columns>
+    <rows id="editBMPanel_rows">
+      <row id="editBMPanel_nameRow"
+           align="center"
+           collapsed="true">
+        <label value="&editBookmarkOverlay.name.label;"
+               class="editBMPanel_rowLabel"
+               accesskey="&editBookmarkOverlay.name.accesskey;"
+               control="editBMPanel_namePicker"/>
+        <textbox id="editBMPanel_namePicker"
+                 onchange="gEditItemOverlay.onNamePickerChange().catch(Components.utils.reportError);"/>
+      </row>
 
-    <grid id="editBookmarkPanelGrid" flex="1">
-      <columns id="editBMPanel_columns">
-        <column id="editBMPanel_labelColumn" />
-        <column flex="1" id="editBMPanel_editColumn" />
-      </columns>
-      <rows id="editBMPanel_rows">
-        <row id="editBMPanel_nameRow"
-             align="center"
-             collapsed="true">
-          <label value="&editBookmarkOverlay.name.label;"
-                 class="editBMPanel_rowLabel"
-                 accesskey="&editBookmarkOverlay.name.accesskey;"
-                 control="editBMPanel_namePicker"/>
-          <textbox id="editBMPanel_namePicker"
-                   onchange="gEditItemOverlay.onNamePickerChange().catch(Components.utils.reportError);"/>
-        </row>
+      <row id="editBMPanel_locationRow"
+           align="center"
+           collapsed="true">
+        <label value="&editBookmarkOverlay.location.label;"
+               class="editBMPanel_rowLabel"
+               accesskey="&editBookmarkOverlay.location.accesskey;"
+               control="editBMPanel_locationField"/>
+        <textbox id="editBMPanel_locationField"
+                 class="uri-element"
+                 onchange="gEditItemOverlay.onLocationFieldChange();"/>
+      </row>
 
-        <row id="editBMPanel_locationRow"
-             align="center"
-             collapsed="true">
-          <label value="&editBookmarkOverlay.location.label;"
-                 class="editBMPanel_rowLabel"
-                 accesskey="&editBookmarkOverlay.location.accesskey;"
-                 control="editBMPanel_locationField"/>
-          <textbox id="editBMPanel_locationField"
-                   class="uri-element"
-                   onchange="gEditItemOverlay.onLocationFieldChange();"/>
-        </row>
-
-        <row id="editBMPanel_folderRow"
-             align="center"
-             collapsed="true">
-          <label value="&editBookmarkOverlay.folder.label;"
-                 class="editBMPanel_rowLabel"
-                 control="editBMPanel_folderMenuList"/>
-          <hbox flex="1" align="center">
-            <menulist id="editBMPanel_folderMenuList"
-                      class="folder-icon"
-                      flex="1"
-                      oncommand="gEditItemOverlay.onFolderMenuListCommand(event).catch(Components.utils.reportError);">
-              <menupopup>
-                <!-- Static item for special folders -->
-                <menuitem id="editBMPanel_toolbarFolderItem"
-                          class="menuitem-iconic folder-icon"/>
-                <menuitem id="editBMPanel_bmRootItem"
-                          class="menuitem-iconic folder-icon"/>
-                <menuitem id="editBMPanel_unfiledRootItem"
-                          class="menuitem-iconic folder-icon"/>
-                <menuseparator id="editBMPanel_chooseFolderSeparator"/>
-                <menuitem id="editBMPanel_chooseFolderMenuItem"
-                          label="&editBookmarkOverlay.choose.label;"
-                          class="menuitem-iconic folder-icon"/>
-                <menuseparator id="editBMPanel_foldersSeparator" hidden="true"/>
-              </menupopup>
-            </menulist>
-            <button id="editBMPanel_foldersExpander"
-                    class="expander-down"
-                    tooltiptext="&editBookmarkOverlay.foldersExpanderDown.tooltip;"
-                    tooltiptextdown="&editBookmarkOverlay.foldersExpanderDown.tooltip;"
-                    tooltiptextup="&editBookmarkOverlay.expanderUp.tooltip;"
-                    oncommand="gEditItemOverlay.toggleFolderTreeVisibility();"/>
-          </hbox>
-        </row>
+      <row id="editBMPanel_folderRow"
+           align="center"
+           collapsed="true">
+        <label value="&editBookmarkOverlay.folder.label;"
+               class="editBMPanel_rowLabel"
+               control="editBMPanel_folderMenuList"/>
+        <hbox flex="1" align="center">
+          <menulist id="editBMPanel_folderMenuList"
+                    class="folder-icon"
+                    flex="1"
+                    oncommand="gEditItemOverlay.onFolderMenuListCommand(event).catch(Components.utils.reportError);">
+            <menupopup>
+              <!-- Static item for special folders -->
+              <menuitem id="editBMPanel_toolbarFolderItem"
+                        class="menuitem-iconic folder-icon"/>
+              <menuitem id="editBMPanel_bmRootItem"
+                        class="menuitem-iconic folder-icon"/>
+              <menuitem id="editBMPanel_unfiledRootItem"
+                        class="menuitem-iconic folder-icon"/>
+              <menuseparator id="editBMPanel_chooseFolderSeparator"/>
+              <menuitem id="editBMPanel_chooseFolderMenuItem"
+                        label="&editBookmarkOverlay.choose.label;"
+                        class="menuitem-iconic folder-icon"/>
+              <menuseparator id="editBMPanel_foldersSeparator" hidden="true"/>
+            </menupopup>
+          </menulist>
+          <button id="editBMPanel_foldersExpander"
+                  class="expander-down"
+                  tooltiptext="&editBookmarkOverlay.foldersExpanderDown.tooltip;"
+                  tooltiptextdown="&editBookmarkOverlay.foldersExpanderDown.tooltip;"
+                  tooltiptextup="&editBookmarkOverlay.expanderUp.tooltip;"
+                  oncommand="gEditItemOverlay.toggleFolderTreeVisibility();"/>
+        </hbox>
+      </row>
 
-        <row id="editBMPanel_folderTreeRow"
-             collapsed="true"
-             flex="1">
-          <spacer/>
-          <vbox flex="1">
-            <tree id="editBMPanel_folderTree"
-                  flex="1"
-                  class="placesTree"
-                  type="places"
-                  height="150"
-                  minheight="150"
-                  editable="true"
-                  onselect="gEditItemOverlay.onFolderTreeSelect();"
-                  disableUserActions="true"
-                  hidecolumnpicker="true">
-              <treecols>
-                <treecol anonid="title" flex="1" primary="true" hideheader="true"/>
-              </treecols>
-              <treechildren flex="1"/>
-            </tree>
+      <row id="editBMPanel_folderTreeRow"
+           collapsed="true"
+           flex="1">
+        <spacer/>
+        <vbox flex="1">
+          <tree id="editBMPanel_folderTree"
+                flex="1"
+                class="placesTree"
+                type="places"
+                height="150"
+                minheight="150"
+                editable="true"
+                onselect="gEditItemOverlay.onFolderTreeSelect();"
+                disableUserActions="true"
+                hidecolumnpicker="true">
+            <treecols>
+              <treecol anonid="title" flex="1" primary="true" hideheader="true"/>
+            </treecols>
+            <treechildren flex="1"/>
+          </tree>
 
-            <hbox id="editBMPanel_newFolderBox">
-              <button label="&editBookmarkOverlay.newFolderButton.label;"
-                      id="editBMPanel_newFolderButton"
-                      accesskey="&editBookmarkOverlay.newFolderButton.accesskey;"
-                      oncommand="gEditItemOverlay.newFolder().catch(Components.utils.reportError);"/>
-            </hbox>
-          </vbox>
-        </row>
+          <hbox id="editBMPanel_newFolderBox">
+            <button label="&editBookmarkOverlay.newFolderButton.label;"
+                    id="editBMPanel_newFolderButton"
+                    accesskey="&editBookmarkOverlay.newFolderButton.accesskey;"
+                    oncommand="gEditItemOverlay.newFolder().catch(Components.utils.reportError);"/>
+          </hbox>
+        </vbox>
+      </row>
 
-        <row id="editBMPanel_tagsRow"
-             align="center"
-             collapsed="true">
-          <label value="&editBookmarkOverlay.tags.label;"
-                 class="editBMPanel_rowLabel"
-                 accesskey="&editBookmarkOverlay.tags.accesskey;"
-                 control="editBMPanel_tagsField"/>
-          <hbox flex="1" align="center">
-            <textbox id="editBMPanel_tagsField"
-                     type="autocomplete"
-                     flex="1"
-                     autocompletesearch="places-tag-autocomplete"
-                     autocompletepopup="PopupAutoComplete"
-                     completedefaultindex="true"
-                     tabscrolling="true"
-                     placeholder="&editBookmarkOverlay.tagsEmptyDesc.label;"
-                     onchange="gEditItemOverlay.onTagsFieldChange();"/>
-            <button id="editBMPanel_tagsSelectorExpander"
-                    class="expander-down"
-                    tooltiptext="&editBookmarkOverlay.tagsExpanderDown.tooltip;"
-                    tooltiptextdown="&editBookmarkOverlay.tagsExpanderDown.tooltip;"
-                    tooltiptextup="&editBookmarkOverlay.expanderUp.tooltip;"
-                    oncommand="gEditItemOverlay.toggleTagsSelector();"/>
-          </hbox>
-        </row>
+      <row id="editBMPanel_tagsRow"
+           align="center"
+           collapsed="true">
+        <label value="&editBookmarkOverlay.tags.label;"
+               class="editBMPanel_rowLabel"
+               accesskey="&editBookmarkOverlay.tags.accesskey;"
+               control="editBMPanel_tagsField"/>
+        <hbox flex="1" align="center">
+          <textbox id="editBMPanel_tagsField"
+                   type="autocomplete"
+                   flex="1"
+                   autocompletesearch="places-tag-autocomplete"
+                   autocompletepopup="PopupAutoComplete"
+                   completedefaultindex="true"
+                   tabscrolling="true"
+                   placeholder="&editBookmarkOverlay.tagsEmptyDesc.label;"
+                   onchange="gEditItemOverlay.onTagsFieldChange();"/>
+          <button id="editBMPanel_tagsSelectorExpander"
+                  class="expander-down"
+                  tooltiptext="&editBookmarkOverlay.tagsExpanderDown.tooltip;"
+                  tooltiptextdown="&editBookmarkOverlay.tagsExpanderDown.tooltip;"
+                  tooltiptextup="&editBookmarkOverlay.expanderUp.tooltip;"
+                  oncommand="gEditItemOverlay.toggleTagsSelector();"/>
+        </hbox>
+      </row>
 
-        <row id="editBMPanel_tagsSelectorRow"
-             align="center"
-             collapsed="true">
-          <spacer/>
-          <listbox id="editBMPanel_tagsSelector"
-                   height="150"/>
-        </row>
+      <row id="editBMPanel_tagsSelectorRow"
+           align="center"
+           collapsed="true">
+        <spacer/>
+        <listbox id="editBMPanel_tagsSelector"
+                 height="150"/>
+      </row>
 
-        <row id="editBMPanel_keywordRow"
-             align="center"
-             collapsed="true">
-          <observes element="additionalInfoBroadcaster" attribute="hidden"/>
-          <label value="&editBookmarkOverlay.keyword.label;"
-                 class="editBMPanel_rowLabel"
-                 accesskey="&editBookmarkOverlay.keyword.accesskey;"
-                 control="editBMPanel_keywordField"/>
-          <textbox id="editBMPanel_keywordField"
-                   onchange="gEditItemOverlay.onKeywordFieldChange();"/>
-        </row>
+      <row id="editBMPanel_keywordRow"
+           align="center"
+           collapsed="true">
+        <observes element="additionalInfoBroadcaster" attribute="hidden"/>
+        <label value="&editBookmarkOverlay.keyword.label;"
+               class="editBMPanel_rowLabel"
+               accesskey="&editBookmarkOverlay.keyword.accesskey;"
+               control="editBMPanel_keywordField"/>
+        <textbox id="editBMPanel_keywordField"
+                 onchange="gEditItemOverlay.onKeywordFieldChange();"/>
+      </row>
 
-        <row id="editBMPanel_descriptionRow"
-             collapsed="true">
-          <observes element="additionalInfoBroadcaster" attribute="hidden"/>
-          <label value="&editBookmarkOverlay.description.label;"
-                 class="editBMPanel_rowLabel"
-                 accesskey="&editBookmarkOverlay.description.accesskey;"
-                 control="editBMPanel_descriptionField"/>
-          <textbox id="editBMPanel_descriptionField"
-                   multiline="true"
-                   rows="4"
-                   onchange="gEditItemOverlay.onDescriptionFieldChange();"/>
-        </row>
-      </rows>
-    </grid>
+      <row id="editBMPanel_descriptionRow"
+           collapsed="true">
+        <observes element="additionalInfoBroadcaster" attribute="hidden"/>
+        <label value="&editBookmarkOverlay.description.label;"
+               class="editBMPanel_rowLabel"
+               accesskey="&editBookmarkOverlay.description.accesskey;"
+               control="editBMPanel_descriptionField"/>
+        <textbox id="editBMPanel_descriptionField"
+                 multiline="true"
+                 rows="4"
+                 onchange="gEditItemOverlay.onDescriptionFieldChange();"/>
+      </row>
+    </rows>
+  </grid>
 
-    <checkbox id="editBMPanel_loadInSidebarCheckbox"
-              collapsed="true"
-              label="&editBookmarkOverlay.loadInSidebar.label;"
-              accesskey="&editBookmarkOverlay.loadInSidebar.accesskey;"
-              oncommand="gEditItemOverlay.onLoadInSidebarCheckboxCommand();">
-      <observes element="additionalInfoBroadcaster" attribute="hidden"/>
-    </checkbox>
+  <checkbox id="editBMPanel_loadInSidebarCheckbox"
+            collapsed="true"
+            label="&editBookmarkOverlay.loadInSidebar.label;"
+            accesskey="&editBookmarkOverlay.loadInSidebar.accesskey;"
+            oncommand="gEditItemOverlay.onLoadInSidebarCheckboxCommand();">
+    <observes element="additionalInfoBroadcaster" attribute="hidden"/>
+  </checkbox>
 
-    <!-- If the ids are changing or additional fields are being added, be sure
-         to sync the values in places.js -->
-    <broadcaster id="additionalInfoBroadcaster"/>
-  </vbox>
-</overlay>
+  <!-- If the ids are changing or additional fields are being added, be sure
+       to sync the values in places.js -->
+  <broadcaster id="additionalInfoBroadcaster"/>
+</vbox>
\ No newline at end of file
--- a/browser/components/places/content/places.js
+++ b/browser/components/places/content/places.js
@@ -1,14 +1,14 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from editBookmarkOverlay.js */
+/* import-globals-from editBookmark.js */
 // Via downloadsViewOverlay.xul -> allDownloadsViewOverlay.xul
 /* import-globals-from ../../../../toolkit/content/contentAreaUtils.js */
 /* import-globals-from ../PlacesUIUtils.jsm */
 /* import-globals-from ../../../../toolkit/components/places/PlacesUtils.jsm */
 
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/TelemetryStopwatch.jsm");
@@ -23,17 +23,17 @@ ChromeUtils.defineModuleGetter(this, "Do
                                "resource://gre/modules/DownloadUtils.jsm");
 
 const RESTORE_FILEPICKER_FILTER_EXT = "*.json;*.jsonlz4";
 const HISTORY_LIBRARY_SEARCH_TELEMETRY = "PLACES_HISTORY_LIBRARY_SEARCH_TIME_MS";
 
 var PlacesOrganizer = {
   _places: null,
 
-  // IDs of fields from editBookmarkOverlay that should be hidden when infoBox
+  // IDs of fields from editBookmark that should be hidden when infoBox
   // is minimal. IDs should be kept in sync with the IDs of the elements
   // observing additionalInfoBroadcaster.
   _additionalInfoFields: [
     "editBMPanel_descriptionRow",
     "editBMPanel_loadInSidebarCheckbox",
     "editBMPanel_keywordRow",
   ],
 
--- a/browser/components/places/content/places.xul
+++ b/browser/components/places/content/places.xul
@@ -5,30 +5,31 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 <?xml-stylesheet href="chrome://browser/content/places/places.css"?>
 <?xml-stylesheet href="chrome://browser/content/places/organizer.css"?>
 
 <?xml-stylesheet href="chrome://global/skin/"?>
 <?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
 <?xml-stylesheet href="chrome://browser/skin/places/organizer.css"?>
-
-<?xul-overlay href="chrome://browser/content/places/editBookmarkOverlay.xul"?>
+<?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css"?>
 
 #ifdef XP_MACOSX
 <?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
 #endif
 
 <!DOCTYPE window [
 <!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
 %placesDTD;
 <!ENTITY % editMenuOverlayDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
 %editMenuOverlayDTD;
 <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
 %browserDTD;
+<!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
+%editBookmarkOverlayDTD;
 #ifdef XP_MACOSX
 <!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
 %baseMenuOverlayDTD;
 #endif
 ]>
 
 <window id="places"
         title="&places.library.title;"
@@ -42,17 +43,17 @@
         toggletoolbar="true"
         persist="width height screenX screenY sizemode">
 
   <script type="application/javascript"
           src="chrome://browser/content/places/places.js"/>
 #ifndef XP_MACOSX
   <!-- On Mac, these are included via macBrowserOverlay.xul -> browser.js -> defineLazyScriptGetter -->
   <script type="application/javascript"
-          src="chrome://browser/content/places/editBookmarkOverlay.js"/>
+          src="chrome://browser/content/places/editBookmark.js"/>
   <script type="application/javascript"
           src="chrome://global/content/globalOverlay.js"/>
   <script type="application/javascript"
           src="chrome://browser/content/utilityOverlay.js"/>
   <script type="application/javascript"><![CDATA[
     ChromeUtils.defineModuleGetter(window,
       "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm");
     ChromeUtils.defineModuleGetter(window,
@@ -422,17 +423,17 @@
           <label id="itemsCountText"/>
           <spacer flex="1"/>
           <description id="selectItemDescription">
               &detailsPane.selectAnItemText.description;
           </description>
           <spacer flex="3"/>
         </vbox>
         <vbox id="infoBox" minimal="true">
-          <vbox id="editBookmarkPanelContent" flex="1"/>
+#include editBookmarkPanel.inc.xul
           <hbox id="infoBoxExpanderWrapper" align="center">
 
             <button type="image" id="infoBoxExpander"
                     class="expander-down"
                     oncommand="PlacesOrganizer.toggleAdditionalInfoFields();"
                     observes="paneElementsBroadcaster"/>
 
             <label id="infoBoxExpanderLabel"
--- a/browser/components/places/jar.mn
+++ b/browser/components/places/jar.mn
@@ -1,31 +1,30 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 browser.jar:
 % overlay chrome://browser/content/places/places.xul chrome://browser/content/places/downloadsViewOverlay.xul
 # Provide another URI for the bookmarkProperties dialog so we can persist the
 # attributes separately
-    content/browser/places/bookmarkProperties2.xul       (content/bookmarkProperties.xul)
+*   content/browser/places/bookmarkProperties2.xul       (content/bookmarkProperties.xul)
 *   content/browser/places/places.xul                    (content/places.xul)
     content/browser/places/places.js                     (content/places.js)
     content/browser/places/places.css                    (content/places.css)
     content/browser/places/organizer.css                 (content/organizer.css)
-    content/browser/places/bookmarkProperties.xul        (content/bookmarkProperties.xul)
+*   content/browser/places/bookmarkProperties.xul        (content/bookmarkProperties.xul)
     content/browser/places/bookmarkProperties.js         (content/bookmarkProperties.js)
     content/browser/places/menu.xml                      (content/menu.xml)
     content/browser/places/tree.xml                      (content/tree.xml)
     content/browser/places/controller.js                 (content/controller.js)
     content/browser/places/treeView.js                   (content/treeView.js)
     content/browser/places/browserPlacesViews.js         (content/browserPlacesViews.js)
 # keep the Places version of the history sidebar at history/history-panel.xul
 # to prevent having to worry about between versions of the browser
 *   content/browser/history/history-panel.xul            (content/history-panel.xul)
     content/browser/places/history-panel.js              (content/history-panel.js)
 # ditto for the bookmarks sidebar
 *   content/browser/bookmarks/bookmarksPanel.xul         (content/bookmarksPanel.xul)
     content/browser/bookmarks/bookmarksPanel.js          (content/bookmarksPanel.js)
     content/browser/bookmarks/sidebarUtils.js            (content/sidebarUtils.js)
-    content/browser/places/editBookmarkOverlay.xul       (content/editBookmarkOverlay.xul)
-    content/browser/places/editBookmarkOverlay.js        (content/editBookmarkOverlay.js)
+    content/browser/places/editBookmark.js               (content/editBookmark.js)
 *   content/browser/places/downloadsViewOverlay.xul      (content/downloadsViewOverlay.xul)
--- a/browser/components/places/tests/browser/browser.ini
+++ b/browser/components/places/tests/browser/browser.ini
@@ -94,15 +94,20 @@ skip-if = (os == "mac" && debug) # Bug 1
 [browser_sort_in_library.js]
 skip-if = (os == 'win' && ccov) # Bug 1423667
 [browser_stayopenmenu.js]
 skip-if = os == "mac" && debug # bug 1400323
 [browser_toolbar_drop_text.js]
 [browser_toolbar_overflow.js]
 [browser_toolbarbutton_menu_context.js]
 [browser_views_iconsupdate.js]
+[browser_bug485100-change-case-loses-tag.js]
+[browser_editBookmark_tags_liveUpdate.js]
+[browser_bug427633_no_newfolder_if_noip.js]
+[browser_editBookmark_keywords.js]
+[browser_bug631374_tags_selector_scroll.js]
 support-files =
   favicon-normal16.png
 [browser_views_liveupdate.js]
 [browser_bookmark_all_tabs.js]
 support-files =
   bookmark_dummy_1.html
   bookmark_dummy_2.html
rename from browser/components/places/tests/chrome/test_bug427633_no_newfolder_if_noip.xul
rename to browser/components/places/tests/browser/browser_bug427633_no_newfolder_if_noip.js
--- a/browser/components/places/tests/chrome/test_bug427633_no_newfolder_if_noip.xul
+++ b/browser/components/places/tests/browser/browser_bug427633_no_newfolder_if_noip.js
@@ -1,92 +1,44 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
-                 type="text/css"?>
+"use strict";
 
-<?xml-stylesheet href="chrome://browser/skin/places/editBookmarkOverlay.css"?>
-<?xml-stylesheet href="chrome://browser/content/places/places.css"?>
-<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
+/**
+ * Bug 427633 - Disable creating a New Folder in the bookmarks dialogs if
+ * insertionPoint is invalid.
+ */
 
-<?xul-overlay href="chrome://browser/content/places/editBookmarkOverlay.xul"?>
-
-<!DOCTYPE window [
-  <!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
-  %editBookmarkOverlayDTD;
-]>
+const TEST_URL = "about:buildconfig";
 
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        title="Bug 427633 - Disable creating a New Folder in the bookmarks dialogs if insertionPoint is invalid"
-        onload="runTest();">
-
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
-  <script type="application/javascript"
-          src="chrome://browser/content/places/editBookmarkOverlay.js"/>
-  <script type="application/javascript" src="head.js" />
-
+add_task(async function() {
+  let tab = await BrowserTestUtils.openNewForegroundTab({
+    gBrowser,
+    opening: TEST_URL,
+    waitForStateStop: true
+  });
 
-  <body xmlns="http://www.w3.org/1999/xhtml" />
-
-  <vbox id="editBookmarkPanelContent"/>
-
-  <script type="application/javascript">
-  <![CDATA[
-
-     /**
-      * Bug 427633 - Disable creating a New Folder in the bookmarks dialogs if
-      * insertionPoint is invalid.
-      */
+  registerCleanupFunction(async () => {
+    bookmarkPanel.removeAttribute("animate");
+    await BrowserTestUtils.removeTab(tab);
+    await PlacesUtils.bookmarks.eraseEverything();
+  });
 
-    function runTest() {
-      SimpleTest.waitForExplicitFinish();
+  let bookmarkPanel = document.getElementById("editBookmarkPanel");
+  bookmarkPanel.setAttribute("animate", false);
+
+  let shownPromise = promisePopupShown(bookmarkPanel);
 
-      (async function() {
-        // Add a bookmark.
-        let bm = await PlacesUtils.bookmarks.insert({
-          parentGuid: PlacesUtils.bookmarks.toolbarGuid,
-          url: "http://www.example.com/",
-          index: PlacesUtils.bookmarks.DEFAULT_INDEX,
-          type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
-          title: "mozilla"
-        });
+  let bookmarkStar = BookmarkingUI.star;
+  bookmarkStar.click();
 
-        // Init panel.
-        ok(gEditItemOverlay, "gEditItemOverlay is in context");
-        let node = await PlacesUIUtils.promiseNodeLikeFromFetchInfo(bm);
-        gEditItemOverlay.initPanel({ node });
-        ok(gEditItemOverlay.initialized, "gEditItemOverlay is initialized");
-
-        let tree = gEditItemOverlay._element("folderTree");
-        await openFolderTree(tree);
+  await shownPromise;
 
-        tree.view.selection.clearSelection();
-        ok(document.getElementById("editBMPanel_newFolderButton").disabled,
-           "New folder button is disabled if there's no selection");
+  ok(gEditItemOverlay, "gEditItemOverlay is in context");
+  ok(gEditItemOverlay.initialized, "gEditItemOverlay is initialized");
 
-        // Cleanup.
-        await PlacesUtils.bookmarks.remove(bm.guid);
-      })().then(() => SimpleTest.finish());
-    }
+  window.gEditItemOverlay.toggleFolderTreeVisibility();
 
-    function openFolderTree(tree) {
-      return new Promise(resolve => {
-        tree.addEventListener("DOMAttrModified", function onAttrModified(event) {
-          if (event.attrName == "place") {
-            tree.removeEventListener("DOMAttrModified", onAttrModified);
-            resolve();
-          }
-        });
+  let tree = gEditItemOverlay._element("folderTree");
 
-        // Open the folder tree.
-        document.getElementById("editBMPanel_foldersExpander").doCommand();
-      });
-    }
-  ]]>
-  </script>
+  tree.view.selection.clearSelection();
+  ok(document.getElementById("editBMPanel_newFolderButton").disabled,
+     "New folder button is disabled if there's no selection");
 
-</window>
+});
rename from browser/components/places/tests/chrome/test_bug485100-change-case-loses-tag.xul
rename to browser/components/places/tests/browser/browser_bug485100-change-case-loses-tag.js
--- a/browser/components/places/tests/chrome/test_bug485100-change-case-loses-tag.xul
+++ b/browser/components/places/tests/browser/browser_bug485100-change-case-loses-tag.js
@@ -1,90 +1,48 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
-                 type="text/css"?>
+"use strict";
 
-<?xml-stylesheet href="chrome://browser/skin/places/editBookmarkOverlay.css"?>
-<?xml-stylesheet href="chrome://browser/content/places/places.css"?>
-<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
-
-<?xul-overlay href="chrome://browser/content/places/editBookmarkOverlay.xul"?>
-
-<!DOCTYPE window [
-  <!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
-  %editBookmarkOverlayDTD;
-]>
+add_task(async function() {
+  let testTag = "foo";
+  let testTagUpper = "Foo";
+  let testURI = Services.io.newURI("http://www.example.com/");
 
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        title="485100: Exchanging a letter of a tag name with its big/small equivalent removes tag from bookmark"
-        onload="runTest();">
-
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
-  <script type="application/javascript"
-          src="chrome://browser/content/places/editBookmarkOverlay.js"/>
-  <script type="application/javascript" src="head.js" />
+  // Add a bookmark.
+  let bm = await PlacesUtils.bookmarks.insert({
+    parentGuid: PlacesUtils.bookmarks.toolbarGuid,
+    index: PlacesUtils.bookmarks.DEFAULT_INDEX,
+    type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
+    title: "mozilla",
+    url: testURI
+  });
 
-  <body xmlns="http://www.w3.org/1999/xhtml" />
-
-  <vbox id="editBookmarkPanelContent"/>
-
-  <script type="application/javascript">
-  <![CDATA[
-    function runTest() {
-      SimpleTest.waitForExplicitFinish();
-      (async function() {
-        let testTag = "foo";
-        let testTagUpper = "Foo";
-        let testURI = Services.io.newURI("http://www.example.com/");
+  // Init panel
+  ok(gEditItemOverlay, "gEditItemOverlay is in context");
+  let node = await PlacesUIUtils.promiseNodeLikeFromFetchInfo(bm);
+  gEditItemOverlay.initPanel({ node });
 
-        // Add a bookmark.
-        let bm = await PlacesUtils.bookmarks.insert({
-          parentGuid: PlacesUtils.bookmarks.toolbarGuid,
-          index: PlacesUtils.bookmarks.DEFAULT_INDEX,
-          type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
-          title: "mozilla",
-          url: testURI
-        });
+  // add a tag
+  document.getElementById("editBMPanel_tagsField").value = testTag;
+  let promiseNotification = PlacesTestUtils.waitForNotification(
+    "onItemChanged", (id, property) => property == "tags");
+  gEditItemOverlay.onTagsFieldChange();
+  await promiseNotification;
 
-        // Init panel
-        ok(gEditItemOverlay, "gEditItemOverlay is in context");
-        let node = await PlacesUIUtils.promiseNodeLikeFromFetchInfo(bm);
-        gEditItemOverlay.initPanel({ node });
-
-        // add a tag
-        document.getElementById("editBMPanel_tagsField").value = testTag;
-        let promiseNotification = PlacesTestUtils.waitForNotification(
-          "onItemChanged", (id, property) => property == "tags");
-        gEditItemOverlay.onTagsFieldChange();
-        await promiseNotification;
+  // test that the tag has been added in the backend
+  is(PlacesUtils.tagging.getTagsForURI(testURI)[0], testTag, "tags match");
 
-        // test that the tag has been added in the backend
-        is(PlacesUtils.tagging.getTagsForURI(testURI)[0], testTag, "tags match");
-
-        // change the tag
-        document.getElementById("editBMPanel_tagsField").value = testTagUpper;
-        // The old sync API doesn't notify a tags change, and fixing it would be
-        // quite complex, so we just wait for a title change until tags are
-        // refactored.
-        promiseNotification = PlacesTestUtils.waitForNotification(
-          "onItemChanged", (id, property) => property == "title");
-        gEditItemOverlay.onTagsFieldChange();
-        await promiseNotification;
+  // change the tag
+  document.getElementById("editBMPanel_tagsField").value = testTagUpper;
+  // The old sync API doesn't notify a tags change, and fixing it would be
+  // quite complex, so we just wait for a title change until tags are
+  // refactored.
+  promiseNotification = PlacesTestUtils.waitForNotification(
+    "onItemChanged", (id, property) => property == "title");
+  gEditItemOverlay.onTagsFieldChange();
+  await promiseNotification;
 
-        // test that the tag has been added in the backend
-        is(PlacesUtils.tagging.getTagsForURI(testURI)[0], testTagUpper, "tags match");
+  // test that the tag has been added in the backend
+  is(PlacesUtils.tagging.getTagsForURI(testURI)[0], testTagUpper, "tags match");
 
-        // Cleanup.
-        PlacesUtils.tagging.untagURI(testURI, [testTag]);
-        await PlacesUtils.bookmarks.remove(bm.guid);
-      })().then(() => SimpleTest.finish());
-    }
-  ]]>
-  </script>
-
-</window>
+  // Cleanup.
+  PlacesUtils.tagging.untagURI(testURI, [testTag]);
+  await PlacesUtils.bookmarks.remove(bm.guid);
+});
rename from browser/components/places/tests/chrome/test_bug631374_tags_selector_scroll.xul
rename to browser/components/places/tests/browser/browser_bug631374_tags_selector_scroll.js
--- a/browser/components/places/tests/chrome/test_bug631374_tags_selector_scroll.xul
+++ b/browser/components/places/tests/browser/browser_bug631374_tags_selector_scroll.js
@@ -1,170 +1,150 @@
-<?xml version="1.0"?>
-
-<!-- Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/ -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
-                 type="text/css"?>
+ /**
+  * This test checks that editing tags doesn't scroll the tags selector
+  * listbox to wrong positions.
+  */
 
-<?xml-stylesheet href="chrome://browser/skin/places/editBookmarkOverlay.css"?>
-<?xml-stylesheet href="chrome://browser/content/places/places.css"?>
-<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
+const TEST_URL = "about:buildconfig";
 
-<?xul-overlay href="chrome://browser/content/places/editBookmarkOverlay.xul"?>
-
-<!DOCTYPE window [
-  <!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
-  %editBookmarkOverlayDTD;
-]>
+add_task(async function() {
+  await PlacesUtils.bookmarks.eraseEverything();
+  let tags = ["a", "b", "c", "d", "e", "f", "g",
+              "h", "i", "l", "m", "n", "o", "p"];
 
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        title="Bug 631374 - Editing tags in the selector scrolls up the listbox"
-        onload="runTest();">
-
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
-  <script type="application/javascript"
-          src="chrome://browser/content/places/editBookmarkOverlay.js"/>
-  <script type="application/javascript" src="head.js" />
+  // Add a bookmark and tag it.
+  let uri1 = Services.io.newURI(TEST_URL);
+  let bm1 = await PlacesUtils.bookmarks.insert({
+    parentGuid: PlacesUtils.bookmarks.toolbarGuid,
+    title: "mozilla",
+    url: uri1.spec
+  });
+  PlacesUtils.tagging.tagURI(uri1, tags);
 
-  <body xmlns="http://www.w3.org/1999/xhtml" />
-
-  <vbox id="editBookmarkPanelContent"/>
-
-  <script type="application/javascript">
-  <![CDATA[
-     /**
-      * This test checks that editing tags doesn't scroll the tags selector
-      * listbox to wrong positions.
-      */
+  // Add a second bookmark so that tags won't disappear when unchecked.
+  let uri2 = Services.io.newURI("http://www2.mozilla.org/");
+  let bm2 = await PlacesUtils.bookmarks.insert({
+    parentGuid: PlacesUtils.bookmarks.toolbarGuid,
+    title: "mozilla",
+    url: uri2.spec
+  });
+  PlacesUtils.tagging.tagURI(uri2, tags);
 
-    function runTest() {
-      SimpleTest.waitForExplicitFinish();
-      (async function() {
-        await PlacesUtils.bookmarks.eraseEverything();
-        let tags = ["a", "b", "c", "d", "e", "f", "g",
-                    "h", "i", "l", "m", "n", "o", "p"];
+  let tab = await BrowserTestUtils.openNewForegroundTab({
+    gBrowser,
+    opening: TEST_URL,
+    waitForStateStop: true
+  });
 
-        // Add a bookmark and tag it.
-        let uri1 = Services.io.newURI("http://www1.mozilla.org/");
-        let bm1 = await PlacesUtils.bookmarks.insert({
-          parentGuid: PlacesUtils.bookmarks.toolbarGuid,
-          title: "mozilla",
-          url: uri1.spec
-        });
-        PlacesUtils.tagging.tagURI(uri1, tags);
+  registerCleanupFunction(async () => {
+    bookmarkPanel.removeAttribute("animate");
+    await BrowserTestUtils.removeTab(tab);
+    await PlacesUtils.bookmarks.eraseEverything();
+  });
+
+  let bookmarkPanel = document.getElementById("editBookmarkPanel");
+  bookmarkPanel.setAttribute("animate", false);
+  let shownPromise = promisePopupShown(bookmarkPanel);
+
+  let bookmarkStar = BookmarkingUI.star;
+  bookmarkStar.click();
 
-        // Add a second bookmark so that tags won't disappear when unchecked.
-        let uri2 = Services.io.newURI("http://www2.mozilla.org/");
-        let bm2 = await PlacesUtils.bookmarks.insert({
-          parentGuid: PlacesUtils.bookmarks.toolbarGuid,
-          title: "mozilla",
-          url: uri2.spec
-        });
-        PlacesUtils.tagging.tagURI(uri2, tags);
+  await shownPromise;
+
+  // Init panel.
+  ok(gEditItemOverlay, "gEditItemOverlay is in context");
+  ok(gEditItemOverlay.initialized, "gEditItemOverlay is initialized");
+
+  await openTagSelector();
+  let tagsSelector = document.getElementById("editBMPanel_tagsSelector");
 
-        // Init panel.
-        ok(gEditItemOverlay, "gEditItemOverlay is in context");
-        let node1 = await PlacesUIUtils.promiseNodeLikeFromFetchInfo(bm1);
-        gEditItemOverlay.initPanel({ node: node1 });
-        ok(gEditItemOverlay.initialized, "gEditItemOverlay is initialized");
-
-        await openTagSelector();
-        let tagsSelector = document.getElementById("editBMPanel_tagsSelector");
+  // Go by two so there is some untouched tag in the middle.
+  for (let i = 8; i < tags.length; i += 2) {
+    tagsSelector.selectedIndex = i;
+    let listItem = tagsSelector.selectedItem;
+    isnot(listItem, null, "Valid listItem found");
 
-        // Go by two so there is some untouched tag in the middle.
-        for (let i = 8; i < tags.length; i += 2) {
-          tagsSelector.selectedIndex = i;
-          let listItem = tagsSelector.selectedItem;
-          isnot(listItem, null, "Valid listItem found");
+    tagsSelector.ensureElementIsVisible(listItem);
+    let visibleIndex = tagsSelector.getIndexOfFirstVisibleRow();
 
-          tagsSelector.ensureElementIsVisible(listItem);
-          let visibleIndex = tagsSelector.getIndexOfFirstVisibleRow();
+    ok(listItem.checked, "Item is checked " + i);
+    let selectedTag = listItem.label;
 
-          ok(listItem.checked, "Item is checked " + i);
-          let selectedTag = listItem.label;
+    // Uncheck the tag.
+    let promiseNotification = PlacesTestUtils.waitForNotification(
+      "onItemChanged", (id, property) => property == "tags");
+    listItem.checked = false;
+    await promiseNotification;
+    is(visibleIndex, tagsSelector.getIndexOfFirstVisibleRow(),
+       "Scroll position did not change");
 
-          // Uncheck the tag.
-          let promiseNotification = PlacesTestUtils.waitForNotification(
-            "onItemChanged", (id, property) => property == "tags");
-          listItem.checked = false;
-          await promiseNotification;
-          is(visibleIndex, tagsSelector.getIndexOfFirstVisibleRow(),
-             "Scroll position did not change");
-
-          // The listbox is rebuilt, so we have to get the new element.
-          let newItem = tagsSelector.selectedItem;
-          isnot(newItem, null, "Valid new listItem found");
-          ok(!newItem.checked, "New listItem is unchecked " + i);
-          is(newItem.label, selectedTag, "Correct tag is still selected");
+    // The listbox is rebuilt, so we have to get the new element.
+    let newItem = tagsSelector.selectedItem;
+    isnot(newItem, null, "Valid new listItem found");
+    ok(!newItem.checked, "New listItem is unchecked " + i);
+    is(newItem.label, selectedTag, "Correct tag is still selected");
 
-          // Check the tag.
-          promiseNotification = PlacesTestUtils.waitForNotification(
-            "onItemChanged", (id, property) => property == "tags");
-          newItem.checked = true;
-          await promiseNotification;
-          is(visibleIndex, tagsSelector.getIndexOfFirstVisibleRow(),
-             "Scroll position did not change");
-        }
-
-        // Remove the second bookmark, then nuke some of the tags.
-        await PlacesUtils.bookmarks.remove(bm2);
+    // Check the tag.
+    promiseNotification = PlacesTestUtils.waitForNotification(
+      "onItemChanged", (id, property) => property == "tags");
+    newItem.checked = true;
+    await promiseNotification;
+    is(visibleIndex, tagsSelector.getIndexOfFirstVisibleRow(),
+       "Scroll position did not change");
+  }
 
-        // Doing this backwords tests more interesting paths.
-        for (let i = tags.length - 1; i >= 0 ; i -= 2) {
-          tagsSelector.selectedIndex = i;
-          let listItem = tagsSelector.selectedItem;
-          isnot(listItem, null, "Valid listItem found");
+  // Remove the second bookmark, then nuke some of the tags.
+  await PlacesUtils.bookmarks.remove(bm2);
 
-          tagsSelector.ensureElementIsVisible(listItem);
-          let firstVisibleTag = tags[tagsSelector.getIndexOfFirstVisibleRow()];
+  // Doing this backwords tests more interesting paths.
+  for (let i = tags.length - 1; i >= 0 ; i -= 2) {
+    tagsSelector.selectedIndex = i;
+    let listItem = tagsSelector.selectedItem;
+    isnot(listItem, null, "Valid listItem found");
 
-          ok(listItem.checked, "Item is checked " + i);
-          let selectedTag = listItem.label;
+    tagsSelector.ensureElementIsVisible(listItem);
+    let firstVisibleTag = tags[tagsSelector.getIndexOfFirstVisibleRow()];
+
+    ok(listItem.checked, "Item is checked " + i);
 
-          // Uncheck the tag.
-          let promiseNotification = PlacesTestUtils.waitForNotification(
-            "onItemChanged", (id, property) => property == "tags");
-          listItem.checked = false;
-          await promiseNotification;
+    // Uncheck the tag.
+    let promiseNotification = PlacesTestUtils.waitForNotification(
+      "onItemChanged", (id, property) => property == "tags");
+    listItem.checked = false;
+    await promiseNotification;
 
-          // Ensure the first visible tag is still visible in the list.
-          let firstVisibleIndex = tagsSelector.getIndexOfFirstVisibleRow();
-          let lastVisibleIndex = firstVisibleIndex + tagsSelector.getNumberOfVisibleRows() -1;
-          let expectedTagIndex = tags.indexOf(firstVisibleTag);
-          ok(expectedTagIndex >= firstVisibleIndex &&
-             expectedTagIndex <= lastVisibleIndex,
-             "Scroll position is correct");
-
-          // The listbox is rebuilt, so we have to get the new element.
-          let newItem = tagsSelector.selectedItem;
-          isnot(newItem, null, "Valid new listItem found");
-          ok(newItem.checked, "New listItem is checked " + i);
-          is(tagsSelector.selectedItem.label,
-             tags[Math.min(i + 1, tags.length - 2)],
-             "The next tag is now selected");
-        }
+    // Ensure the first visible tag is still visible in the list.
+    let firstVisibleIndex = tagsSelector.getIndexOfFirstVisibleRow();
+    let lastVisibleIndex = firstVisibleIndex + tagsSelector.getNumberOfVisibleRows() - 1;
+    let expectedTagIndex = tags.indexOf(firstVisibleTag);
+    ok(expectedTagIndex >= firstVisibleIndex &&
+       expectedTagIndex <= lastVisibleIndex,
+       "Scroll position is correct");
 
-        // Cleanup.
-        await PlacesUtils.bookmarks.remove(bm1);
-      })().catch(ex => ok(false, "test failed: " + ex)).then(SimpleTest.finish);
-    }
+    // The listbox is rebuilt, so we have to get the new element.
+    let newItem = tagsSelector.selectedItem;
+    isnot(newItem, null, "Valid new listItem found");
+    ok(newItem.checked, "New listItem is checked " + i);
+    is(tagsSelector.selectedItem.label,
+       tags[Math.min(i + 1, tags.length - 2)],
+       "The next tag is now selected");
+  }
 
-    function openTagSelector() {
-      // Wait for the tags selector to be open.
-      let promise = new Promise(resolve => {
-        let row = document.getElementById("editBMPanel_tagsSelectorRow");
-        row.addEventListener("DOMAttrModified", function onAttrModified() {
-          row.removeEventListener("DOMAttrModified", onAttrModified);
-          resolve();
-        });
-      });
-      // Open the tags selector.
-      document.getElementById("editBMPanel_tagsSelectorExpander").doCommand();
-      return promise;
-    }
-  ]]>
-  </script>
+  let hiddenPromise = promisePopupHidden(bookmarkPanel);
+  let doneButton = document.getElementById("editBookmarkPanelDoneButton");
+  doneButton.click();
+  await hiddenPromise;
+  // Cleanup.
+  await PlacesUtils.bookmarks.remove(bm1);
+});
 
-</window>
+function openTagSelector() {
+  // Wait for the tags selector to be open.
+  let promise = new Promise(resolve => {
+    let row = document.getElementById("editBMPanel_tagsSelectorRow");
+    row.addEventListener("DOMAttrModified", function onAttrModified() {
+      resolve();
+    }, {once: true});
+  });
+  // Open the tags selector.
+  document.getElementById("editBMPanel_tagsSelectorExpander").doCommand();
+  return promise;
+}
rename from browser/components/places/tests/chrome/test_editBookmarkOverlay_keywords.xul
rename to browser/components/places/tests/browser/browser_editBookmark_keywords.js
--- a/browser/components/places/tests/chrome/test_editBookmarkOverlay_keywords.xul
+++ b/browser/components/places/tests/browser/browser_editBookmark_keywords.js
@@ -1,100 +1,74 @@
-<?xml version="1.0"?>
+"use strict";
 
-<!-- Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/ -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
-                 type="text/css"?>
+const TEST_URL = "about:blank";
 
-<?xml-stylesheet href="chrome://browser/skin/places/editBookmarkOverlay.css"?>
-<?xml-stylesheet href="chrome://browser/content/places/places.css"?>
-<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
-
-<?xul-overlay href="chrome://browser/content/places/editBookmarkOverlay.xul"?>
-
-<!DOCTYPE window [
-  <!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
-  %editBookmarkOverlayDTD;
-]>
+add_task(async function() {
+  function promiseOnItemChanged() {
+    return new Promise(resolve => {
+      PlacesUtils.bookmarks.addObserver({
+        onBeginUpdateBatch() {},
+        onEndUpdateBatch() {},
+        onItemAdded() {},
+        onItemRemoved() {},
+        onItemVisited() {},
+        onItemMoved() {},
+        onItemChanged(id, property, isAnno, value) {
+          PlacesUtils.bookmarks.removeObserver(this);
+          resolve({ property, value });
+        },
+        QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver])
+      });
+    });
+  }
 
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        title="Bug 1343256 - Bookmark keywords disappear from one bookmark when adding a keyword to another bookmark"
-        onload="runTest();">
+  let tab = await BrowserTestUtils.openNewForegroundTab({
+    gBrowser,
+    opening: TEST_URL,
+    waitForStateStop: true
+  });
 
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-  <script type="application/javascript"
-          src="chrome://browser/content/places/editBookmarkOverlay.js"/>
-  <script type="application/javascript" src="head.js" />
+  let library = await promiseLibrary("UnfiledBookmarks");
+  registerCleanupFunction(async () => {
+    await promiseLibraryClosed(library);
+    await PlacesUtils.bookmarks.eraseEverything();
+    await BrowserTestUtils.removeTab(tab);
+  });
 
+  let keywordField = library.document.getElementById("editBMPanel_keywordField");
 
-  <body xmlns="http://www.w3.org/1999/xhtml" />
-
-  <vbox id="editBookmarkPanelContent"/>
+  for (let i = 0; i < 2; ++i) {
+    let bm = await PlacesUtils.bookmarks.insert({
+      url: `http://www.test${i}.me/`,
+      parentGuid: PlacesUtils.bookmarks.unfiledGuid,
+    });
 
-  <script type="application/javascript">
-  <![CDATA[
-    function runTest() {
-      SimpleTest.waitForExplicitFinish();
-      (test.bind(this))()
-          .catch(ex => ok(false, ex))
-          .then(() => PlacesUtils.bookmarks.eraseEverything())
-          .then(SimpleTest.finish);
+    let node = library.ContentTree.view.view.nodeForTreeIndex(i);
+    is(node.bookmarkGuid, bm.guid, "Found the expected bookmark");
+    // Select the bookmark.
+    library.ContentTree.view.selectNode(node);
+    synthesizeClickOnSelectedTreeCell(library.ContentTree.view);
+
+    // Expand the additional info for the first bookmark.
+    if (i === 0) {
+      library.document.getElementById("infoBoxExpander").click();
     }
 
-    function promiseOnItemChanged() {
-      return new Promise(resolve => {
-        PlacesUtils.bookmarks.addObserver({
-          onBeginUpdateBatch() {},
-          onEndUpdateBatch() {},
-          onItemAdded() {},
-          onItemRemoved() {},
-          onItemVisited() {},
-          onItemMoved() {},
-          onItemChanged(id, property, isAnno, value) {
-            PlacesUtils.bookmarks.removeObserver(this);
-            resolve({ property, value });
-          },
-          QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver])
-        });
-      });
-    }
-
-    async function test() {
-      ok(gEditItemOverlay, "Sanity check: gEditItemOverlay is in context");
-      let keywordField = document.getElementById("editBMPanel_keywordField");
+    is(library.document.getElementById("editBMPanel_keywordField").value, "",
+      "The keyword field should be empty");
+    info("Add a keyword to the bookmark");
+    let promise = promiseOnItemChanged();
+    keywordField.focus();
+    keywordField.value = "kw";
+    EventUtils.sendString(i.toString(), library);
+    keywordField.blur();
+    let {property, value} = await promise;
+    is(property, "keyword", "The keyword should have been changed");
 
-      for (let i = 0; i < 2; ++i) {
-        let bm = await PlacesUtils.bookmarks.insert({
-          url: `http://www.test${i}.me/`,
-          parentGuid: PlacesUtils.bookmarks.unfiledGuid,
-        });
-        info(`Init panel on bookmark #${i+1}`);
-        let node = await PlacesUIUtils.promiseNodeLikeFromFetchInfo(bm);
-        gEditItemOverlay.initPanel({ node });
-        is(document.getElementById("editBMPanel_keywordField").value, "",
-          "The keyword field should be empty");
-        info("Add a keyword to the bookmark");
-        let promise = promiseOnItemChanged();
-        keywordField.focus();
-        keywordField.value = "kw";
-        sendString(i.toString());
-        synthesizeKey("KEY_Enter");
-        keywordField.blur();
-        let {property, value} = await promise;
-        is(property, "keyword", "The keyword should have been changed");
-        is(value, `kw${i}`, "The new keyword value is correct");
-      }
+    is(value, `kw${i}`, "The new keyword value is correct");
+  }
 
-      for (let i = 0; i < 2; ++i) {
-        let entry = await PlacesUtils.keywords.fetch({ url: `http://www.test${i}.me/` });
-        is(entry.keyword, `kw${i}`, `The keyword for http://www.test${i}.me/ is correct`);
-      }
-    };
-  ]]>
-  </script>
-
-</window>
+  for (let i = 0; i < 2; ++i) {
+    let entry = await PlacesUtils.keywords.fetch({ url: `http://www.test${i}.me/` });
+    is(entry.keyword, `kw${i}`, `The keyword for http://www.test${i}.me/ is correct`);
+  }
+});
rename from browser/components/places/tests/chrome/test_editBookmarkOverlay_tags_liveUpdate.xul
rename to browser/components/places/tests/browser/browser_editBookmark_tags_liveUpdate.js
--- a/browser/components/places/tests/chrome/test_editBookmarkOverlay_tags_liveUpdate.xul
+++ b/browser/components/places/tests/browser/browser_editBookmark_tags_liveUpdate.js
@@ -1,216 +1,174 @@
-<?xml version="1.0"?>
-
-<!-- Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/ -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
-                 type="text/css"?>
+"use strict";
 
-<?xml-stylesheet href="chrome://browser/skin/places/editBookmarkOverlay.css"?>
-<?xml-stylesheet href="chrome://browser/content/places/places.css"?>
-<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
-
-<?xul-overlay href="chrome://browser/content/places/editBookmarkOverlay.xul"?>
-
-<!DOCTYPE window [
-  <!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
-  %editBookmarkOverlayDTD;
-]>
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        title="485100: Exchanging a letter of a tag name with its big/small equivalent removes tag from bookmark"
-        onload="runTest();">
+function checkTagsSelector(aAvailableTags, aCheckedTags) {
+  is(PlacesUtils.tagging.allTags.length, aAvailableTags.length,
+     "tagging service is in sync.");
+  let tagsSelector = document.getElementById("editBMPanel_tagsSelector");
+  let children = tagsSelector.childNodes;
+  is(children.length, aAvailableTags.length,
+      "Found expected number of tags in the tags selector");
 
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
-  <script type="application/javascript"
-          src="chrome://browser/content/places/editBookmarkOverlay.js"/>
-  <script type="application/javascript" src="head.js" />
-
-  <body xmlns="http://www.w3.org/1999/xhtml" />
-
-  <vbox id="editBookmarkPanelContent"/>
+  Array.prototype.forEach.call(children, function(aChild) {
+    let tag = aChild.getAttribute("label");
+    ok(true, "Found tag '" + tag + "' in the selector");
+    ok(aAvailableTags.includes(tag), "Found expected tag");
+    let checked = aChild.getAttribute("checked") == "true";
+    is(checked, aCheckedTags.includes(tag),
+       "Tag is correctly marked");
+  });
+}
 
-  <script type="application/javascript">
-  <![CDATA[
-    function checkTagsSelector(aAvailableTags, aCheckedTags) {
-      is(PlacesUtils.tagging.allTags.length, aAvailableTags.length,
-         "tagging service is in sync.");
-      let tagsSelector = document.getElementById("editBMPanel_tagsSelector");
-      let children = tagsSelector.childNodes;
-      is(children.length, aAvailableTags.length,
-          "Found expected number of tags in the tags selector");
+add_task(async function() {
+  const TEST_URI = Services.io.newURI("http://www.test.me/");
+  const TEST_URI2 = Services.io.newURI("http://www.test.again.me/");
+  const TEST_TAG = "test-tag";
+
+  ok(gEditItemOverlay, "Sanity check: gEditItemOverlay is in context");
 
-      Array.prototype.forEach.call(children, function (aChild) {
-        let tag = aChild.getAttribute("label");
-        ok(true, "Found tag '" + tag + "' in the selector");
-        ok(aAvailableTags.includes(tag), "Found expected tag");
-        let checked = aChild.getAttribute("checked") == "true";
-        is(checked, aCheckedTags.includes(tag),
-           "Tag is correctly marked");
-      });
-    }
+  // Open the tags selector.
+  document.getElementById("editBMPanel_tagsSelectorRow").collapsed = false;
+
+  // Add a bookmark.
+  let bm = await PlacesUtils.bookmarks.insert({
+    parentGuid: PlacesUtils.bookmarks.unfiledGuid,
+    index: PlacesUtils.bookmarks.DEFAULT_INDEX,
+    type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
+    url: TEST_URI.spec,
+    title: "test.me"
+  });
 
-    function runTest() {
-      SimpleTest.waitForExplicitFinish();
+  // Init panel.
+  let node = await PlacesUIUtils.promiseNodeLikeFromFetchInfo(bm);
+  gEditItemOverlay.initPanel({ node });
 
-      (async function() {
-        const TEST_URI = Services.io.newURI("http://www.test.me/");
-        const TEST_URI2 = Services.io.newURI("http://www.test.again.me/");
-        const TEST_TAG = "test-tag";
-
-        ok(gEditItemOverlay, "Sanity check: gEditItemOverlay is in context");
-
-        // Open the tags selector.
-        document.getElementById("editBMPanel_tagsSelectorRow").collapsed = false;
+  // Add a tag.
+  PlacesUtils.tagging.tagURI(TEST_URI, [TEST_TAG]);
 
-        // Add a bookmark.
-        let bm = await PlacesUtils.bookmarks.insert({
-          parentGuid: PlacesUtils.bookmarks.unfiledGuid,
-          index: PlacesUtils.bookmarks.DEFAULT_INDEX,
-          type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
-          url: TEST_URI.spec,
-          title: "test.me"
-        });
-
-        // Init panel.
-        let node = await PlacesUIUtils.promiseNodeLikeFromFetchInfo(bm);
-        gEditItemOverlay.initPanel({ node });
+  is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], TEST_TAG,
+     "Correctly added tag to a single bookmark");
+  await BrowserTestUtils.waitForCondition(
+    () => document.getElementById("editBMPanel_tagsField").value == TEST_TAG,
+    "Editing a single bookmark shows the added tag.");
+  checkTagsSelector([TEST_TAG], [TEST_TAG]);
 
-        // Add a tag.
-        PlacesUtils.tagging.tagURI(TEST_URI, [TEST_TAG]);
-
-        is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], TEST_TAG,
-           "Correctly added tag to a single bookmark");
-        await BrowserTestUtils.waitForCondition(
-          () => document.getElementById("editBMPanel_tagsField").value == TEST_TAG,
-          "Editing a single bookmark shows the added tag.");
-        checkTagsSelector([TEST_TAG], [TEST_TAG]);
+  // Remove tag.
+  PlacesUtils.tagging.untagURI(TEST_URI, [TEST_TAG]);
+  is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], undefined,
+     "The tag has been removed");
+  await BrowserTestUtils.waitForCondition(
+    () => document.getElementById("editBMPanel_tagsField").value == "",
+    "Editing a single bookmark should not show any tag");
+  checkTagsSelector([], []);
 
-        // Remove tag.
-        PlacesUtils.tagging.untagURI(TEST_URI, [TEST_TAG]);
-        is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], undefined,
-           "The tag has been removed");
-        await BrowserTestUtils.waitForCondition(
-          () => document.getElementById("editBMPanel_tagsField").value == "",
-          "Editing a single bookmark should not show any tag");
-        checkTagsSelector([], []);
+  // Add a second bookmark.
+  let bm2 = await PlacesUtils.bookmarks.insert({
+    parentGuid: PlacesUtils.bookmarks.unfiledGuid,
+    index: PlacesUtils.bookmarks.DEFAULT_INDEX,
+    type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
+    title: "test.again.me",
+    url: TEST_URI2.spec
+  });
 
-        // Add a second bookmark.
-        let bm2 = await PlacesUtils.bookmarks.insert({
-          parentGuid: PlacesUtils.bookmarks.unfiledGuid,
-          index: PlacesUtils.bookmarks.DEFAULT_INDEX,
-          type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
-          title: "test.again.me",
-          url: TEST_URI2.spec
-        });
+  // Init panel with multiple uris.
+  gEditItemOverlay.initPanel({ uris: [TEST_URI, TEST_URI2] });
+
+  // Add a tag to the first uri.
+  PlacesUtils.tagging.tagURI(TEST_URI, [TEST_TAG]);
+  is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], TEST_TAG,
+     "Correctly added a tag to the first bookmark.");
+  await BrowserTestUtils.waitForCondition(
+    () => document.getElementById("editBMPanel_tagsField").value == "",
+    "Editing multiple bookmarks without matching tags should not show any tag.");
+  checkTagsSelector([TEST_TAG], []);
 
-        // Init panel with multiple uris.
-        gEditItemOverlay.initPanel({ uris: [TEST_URI, TEST_URI2] });
+  // Add a tag to the second uri.
+  PlacesUtils.tagging.tagURI(TEST_URI2, [TEST_TAG]);
+  is(PlacesUtils.tagging.getTagsForURI(TEST_URI2)[0], TEST_TAG,
+     "Correctly added a tag to the second bookmark.");
+  await BrowserTestUtils.waitForCondition(
+    () => document.getElementById("editBMPanel_tagsField").value == TEST_TAG,
+    "Editing multiple bookmarks should show matching tags.");
+  checkTagsSelector([TEST_TAG], [TEST_TAG]);
 
-        // Add a tag to the first uri.
-        PlacesUtils.tagging.tagURI(TEST_URI, [TEST_TAG]);
-        is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], TEST_TAG,
-           "Correctly added a tag to the first bookmark.");
-        await BrowserTestUtils.waitForCondition(
-          () => document.getElementById("editBMPanel_tagsField").value == "",
-          "Editing multiple bookmarks without matching tags should not show any tag.");
-        checkTagsSelector([TEST_TAG], []);
-
-        // Add a tag to the second uri.
-        PlacesUtils.tagging.tagURI(TEST_URI2, [TEST_TAG]);
-        is(PlacesUtils.tagging.getTagsForURI(TEST_URI2)[0], TEST_TAG,
-           "Correctly added a tag to the second bookmark.");
-        await BrowserTestUtils.waitForCondition(
-          () => document.getElementById("editBMPanel_tagsField").value == TEST_TAG,
-          "Editing multiple bookmarks should show matching tags.");
-        checkTagsSelector([TEST_TAG], [TEST_TAG]);
+  // Remove tag from the first bookmark.
+  PlacesUtils.tagging.untagURI(TEST_URI, [TEST_TAG]);
+  is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], undefined,
+     "Correctly removed tag from the first bookmark.");
+  await BrowserTestUtils.waitForCondition(
+    () => document.getElementById("editBMPanel_tagsField").value == "",
+    "Editing multiple bookmarks without matching tags should not show any tag.");
+  checkTagsSelector([TEST_TAG], []);
 
-        // Remove tag from the first bookmark.
-        PlacesUtils.tagging.untagURI(TEST_URI, [TEST_TAG]);
-        is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], undefined,
-           "Correctly removed tag from the first bookmark.");
-        await BrowserTestUtils.waitForCondition(
-          () => document.getElementById("editBMPanel_tagsField").value == "",
-          "Editing multiple bookmarks without matching tags should not show any tag.");
-        checkTagsSelector([TEST_TAG], []);
+  // Remove tag from the second bookmark.
+  PlacesUtils.tagging.untagURI(TEST_URI2, [TEST_TAG]);
+  is(PlacesUtils.tagging.getTagsForURI(TEST_URI2)[0], undefined,
+     "Correctly removed tag from the second bookmark.");
+  await BrowserTestUtils.waitForCondition(
+    () => document.getElementById("editBMPanel_tagsField").value == "",
+    "Editing multiple bookmarks without matching tags should not show any tag.");
+  checkTagsSelector([], []);
 
-        // Remove tag from the second bookmark.
-        PlacesUtils.tagging.untagURI(TEST_URI2, [TEST_TAG]);
-        is(PlacesUtils.tagging.getTagsForURI(TEST_URI2)[0], undefined,
-           "Correctly removed tag from the second bookmark.");
-        await BrowserTestUtils.waitForCondition(
-          () => document.getElementById("editBMPanel_tagsField").value == "",
-          "Editing multiple bookmarks without matching tags should not show any tag.");
-        checkTagsSelector([], []);
+  // Init panel with a nsIURI entry.
+  gEditItemOverlay.initPanel({ uris: [TEST_URI] });
 
-        // Init panel with a nsIURI entry.
-        gEditItemOverlay.initPanel({ uris: [TEST_URI] });
-
-        // Add a tag.
-        PlacesUtils.tagging.tagURI(TEST_URI, [TEST_TAG]);
-        is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], TEST_TAG,
-           "Correctly added tag to the first entry.");
-        await BrowserTestUtils.waitForCondition(
-          () => document.getElementById("editBMPanel_tagsField").value == TEST_TAG,
-          "Editing a single nsIURI entry shows the added tag.");
-        checkTagsSelector([TEST_TAG], [TEST_TAG]);
+  // Add a tag.
+  PlacesUtils.tagging.tagURI(TEST_URI, [TEST_TAG]);
+  is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], TEST_TAG,
+     "Correctly added tag to the first entry.");
+  await BrowserTestUtils.waitForCondition(
+    () => document.getElementById("editBMPanel_tagsField").value == TEST_TAG,
+    "Editing a single nsIURI entry shows the added tag.");
+  checkTagsSelector([TEST_TAG], [TEST_TAG]);
 
-        // Remove tag.
-        PlacesUtils.tagging.untagURI(TEST_URI, [TEST_TAG]);
-        is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], undefined,
-           "Correctly removed tag from the nsIURI entry.");
-        await BrowserTestUtils.waitForCondition(
-          () => document.getElementById("editBMPanel_tagsField").value == "",
-          "Editing a single nsIURI entry should not show any tag.");
-        checkTagsSelector([], []);
+  // Remove tag.
+  PlacesUtils.tagging.untagURI(TEST_URI, [TEST_TAG]);
+  is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], undefined,
+     "Correctly removed tag from the nsIURI entry.");
+  await BrowserTestUtils.waitForCondition(
+    () => document.getElementById("editBMPanel_tagsField").value == "",
+    "Editing a single nsIURI entry should not show any tag.");
+  checkTagsSelector([], []);
 
-        // Init panel with multiple nsIURI entries.
-        gEditItemOverlay.initPanel({ uris: [TEST_URI, TEST_URI2] });
+  // Init panel with multiple nsIURI entries.
+  gEditItemOverlay.initPanel({ uris: [TEST_URI, TEST_URI2] });
 
-        // Add a tag to the first entry.
-        PlacesUtils.tagging.tagURI(TEST_URI, [TEST_TAG]);
-        is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], TEST_TAG,
-           "Tag correctly added.");
-        await BrowserTestUtils.waitForCondition(
-          () => document.getElementById("editBMPanel_tagsField").value == "",
-          "Editing multiple nsIURIs without matching tags should not show any tag.");
-        checkTagsSelector([TEST_TAG], []);
+  // Add a tag to the first entry.
+  PlacesUtils.tagging.tagURI(TEST_URI, [TEST_TAG]);
+  is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], TEST_TAG,
+     "Tag correctly added.");
+  await BrowserTestUtils.waitForCondition(
+    () => document.getElementById("editBMPanel_tagsField").value == "",
+    "Editing multiple nsIURIs without matching tags should not show any tag.");
+  checkTagsSelector([TEST_TAG], []);
 
-        // Add a tag to the second entry.
-        PlacesUtils.tagging.tagURI(TEST_URI2, [TEST_TAG]);
-        is(PlacesUtils.tagging.getTagsForURI(TEST_URI2)[0], TEST_TAG,
-           "Tag correctly added.");
-        await BrowserTestUtils.waitForCondition(
-          () => document.getElementById("editBMPanel_tagsField").value == TEST_TAG,
-          "Editing multiple nsIURIs should show matching tags.");
-        checkTagsSelector([TEST_TAG], [TEST_TAG]);
-
-        // Remove tag from the first entry.
-        PlacesUtils.tagging.untagURI(TEST_URI, [TEST_TAG]);
-        is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], undefined,
-           "Correctly removed tag from the first entry.");
-        await BrowserTestUtils.waitForCondition(
-          () => document.getElementById("editBMPanel_tagsField").value == "",
-          "Editing multiple nsIURIs without matching tags should not show any tag.");
-        checkTagsSelector([TEST_TAG], []);
+  // Add a tag to the second entry.
+  PlacesUtils.tagging.tagURI(TEST_URI2, [TEST_TAG]);
+  is(PlacesUtils.tagging.getTagsForURI(TEST_URI2)[0], TEST_TAG,
+     "Tag correctly added.");
+  await BrowserTestUtils.waitForCondition(
+    () => document.getElementById("editBMPanel_tagsField").value == TEST_TAG,
+    "Editing multiple nsIURIs should show matching tags.");
+  checkTagsSelector([TEST_TAG], [TEST_TAG]);
 
-        // Remove tag from the second entry.
-        PlacesUtils.tagging.untagURI(TEST_URI2, [TEST_TAG]);
-        is(PlacesUtils.tagging.getTagsForURI(TEST_URI2)[0], undefined,
-           "Correctly removed tag from the second entry.");
-        await BrowserTestUtils.waitForCondition(
-          () => document.getElementById("editBMPanel_tagsField").value == "",
-          "Editing multiple nsIURIs without matching tags should not show any tag.");
-        checkTagsSelector([], []);
+  // Remove tag from the first entry.
+  PlacesUtils.tagging.untagURI(TEST_URI, [TEST_TAG]);
+  is(PlacesUtils.tagging.getTagsForURI(TEST_URI)[0], undefined,
+     "Correctly removed tag from the first entry.");
+  await BrowserTestUtils.waitForCondition(
+    () => document.getElementById("editBMPanel_tagsField").value == "",
+    "Editing multiple nsIURIs without matching tags should not show any tag.");
+  checkTagsSelector([TEST_TAG], []);
 
-        // Cleanup.
-        await PlacesUtils.bookmarks.remove(bm.guid);
-        await PlacesUtils.bookmarks.remove(bm2.guid);
-      })().then(SimpleTest.finish);
-    }
-  ]]>
-  </script>
+  // Remove tag from the second entry.
+  PlacesUtils.tagging.untagURI(TEST_URI2, [TEST_TAG]);
+  is(PlacesUtils.tagging.getTagsForURI(TEST_URI2)[0], undefined,
+     "Correctly removed tag from the second entry.");
+  await BrowserTestUtils.waitForCondition(
+    () => document.getElementById("editBMPanel_tagsField").value == "",
+    "Editing multiple nsIURIs without matching tags should not show any tag.");
+  checkTagsSelector([], []);
 
-</window>
+  // Cleanup.
+  await PlacesUtils.bookmarks.remove(bm.guid);
+  await PlacesUtils.bookmarks.remove(bm2.guid);
+});
--- a/browser/components/places/tests/chrome/chrome.ini
+++ b/browser/components/places/tests/chrome/chrome.ini
@@ -1,14 +1,9 @@
 [DEFAULT]
 support-files = head.js
 
 [test_0_bug510634.xul]
 [test_bug1163447_selectItems_through_shortcut.xul]
-[test_bug427633_no_newfolder_if_noip.xul]
-[test_bug485100-change-case-loses-tag.xul]
 [test_bug549192.xul]
 [test_bug549491.xul]
-[test_bug631374_tags_selector_scroll.xul]
-[test_editBookmarkOverlay_keywords.xul]
-[test_editBookmarkOverlay_tags_liveUpdate.xul]
 [test_selectItems_on_nested_tree.xul]
-[test_treeview_date.xul]
+[test_treeview_date.xul]
\ No newline at end of file
--- a/browser/themes/linux/jar.mn
+++ b/browser/themes/linux/jar.mn
@@ -29,17 +29,17 @@ browser.jar:
   skin/classic/browser/feeds/subscribe.css            (feeds/subscribe.css)
   skin/classic/browser/notification-icons/geo-blocked.svg  (notification-icons/geo-blocked.svg)
   skin/classic/browser/notification-icons/geo-detailed.svg (notification-icons/geo-detailed.svg)
   skin/classic/browser/notification-icons/geo.svg          (notification-icons/geo.svg)
   skin/classic/browser/places/allBookmarks.png        (places/allBookmarks.png)
   skin/classic/browser/places/bookmarksMenu.png       (places/bookmarksMenu.png)
   skin/classic/browser/places/bookmarksToolbar.png    (places/bookmarksToolbar.png)
   skin/classic/browser/places/bookmarks-menu-arrow.png           (places/bookmarks-menu-arrow.png)
-* skin/classic/browser/places/editBookmarkOverlay.css (places/editBookmarkOverlay.css)
+* skin/classic/browser/places/editBookmark.css (places/editBookmark.css)
   skin/classic/browser/places/livemark-item.png       (places/livemark-item.png)
 * skin/classic/browser/places/places.css              (places/places.css)
   skin/classic/browser/places/organizer.css           (places/organizer.css)
   skin/classic/browser/places/organizer.xml           (places/organizer.xml)
   skin/classic/browser/places/tag.png                 (places/tag.png)
   skin/classic/browser/places/toolbarDropMarker.png   (places/toolbarDropMarker.png)
   skin/classic/browser/places/unsortedBookmarks.png   (places/unsortedBookmarks.png)
   skin/classic/browser/places/downloads.png           (places/downloads.png)
rename from browser/themes/linux/places/editBookmarkOverlay.css
rename to browser/themes/linux/places/editBookmark.css
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -447,20 +447,20 @@ html|input.urlbar-input {
 #editBookmarkPanelHeader {
   margin-bottom: 6px;
 }
 
 .editBookmarkPanelBottomButton:last-child {
   margin-inline-start: 8px;
 }
 
-/* The following elements come from editBookmarkOverlay.xul. Styling that's
+/* The following elements come from editBookmarkPanel.inc.xul. Styling that's
    specific to the editBookmarkPanel should be in browser.css. Styling that
-   should be shared by all editBookmarkOverlay.xul consumers should be in
-   editBookmarkOverlay.css. */
+   should be shared by all editBookmarkPanel.inc.xul consumers should be in
+   editBookmark.css. */
 
 #editBMPanel_newFolderBox {
   background: linear-gradient(#fff, #f2f2f2);
   background-origin: padding-box;
   background-clip: padding-box;
   border-radius: 0 0 3px 3px;
   border: 1px solid #a5a5a5;
   box-shadow: inset 0 1px rgba(255,255,255,.8),
--- a/browser/themes/osx/jar.mn
+++ b/browser/themes/osx/jar.mn
@@ -38,17 +38,17 @@ browser.jar:
   skin/classic/browser/places/allBookmarks.png              (places/allBookmarks.png)
 * skin/classic/browser/places/places.css                    (places/places.css)
   skin/classic/browser/places/organizer.css                 (places/organizer.css)
   skin/classic/browser/places/bookmarksMenu.png             (places/bookmarksMenu.png)
   skin/classic/browser/places/bookmarksToolbar.png          (places/bookmarksToolbar.png)
   skin/classic/browser/places/bookmarksToolbar@2x.png       (places/bookmarksToolbar@2x.png)
   skin/classic/browser/places/toolbar.png                   (places/toolbar.png)
   skin/classic/browser/places/toolbarDropMarker.png         (places/toolbarDropMarker.png)
-  skin/classic/browser/places/editBookmarkOverlay.css       (places/editBookmarkOverlay.css)
+  skin/classic/browser/places/editBookmark.css              (places/editBookmark.css)
   skin/classic/browser/places/unfiledBookmarks.png          (places/unfiledBookmarks.png)
   skin/classic/browser/places/unfiledBookmarks@2x.png       (places/unfiledBookmarks@2x.png)
   skin/classic/browser/places/tag.png                       (places/tag.png)
   skin/classic/browser/places/tag@2x.png                    (places/tag@2x.png)
   skin/classic/browser/places/downloads.png                 (places/downloads.png)
   skin/classic/browser/places/livemark-item.png             (places/livemark-item.png)
   skin/classic/browser/preferences/alwaysAsk.png            (preferences/alwaysAsk.png)
   skin/classic/browser/preferences/application.png          (preferences/application.png)
rename from browser/themes/osx/places/editBookmarkOverlay.css
rename to browser/themes/osx/places/editBookmark.css
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -31,17 +31,17 @@ browser.jar:
   skin/classic/browser/notification-icons/geo-blocked.svg      (notification-icons/geo-blocked.svg)
   skin/classic/browser/notification-icons/geo-detailed.svg     (notification-icons/geo-detailed.svg)
   skin/classic/browser/notification-icons/geo.svg              (notification-icons/geo.svg)
 * skin/classic/browser/places/places.css                       (places/places.css)
 * skin/classic/browser/places/organizer.css                    (places/organizer.css)
   skin/classic/browser/places/bookmarksMenu.png                (places/bookmarksMenu.png)
   skin/classic/browser/places/bookmarksToolbar.png             (places/bookmarksToolbar.png)
   skin/classic/browser/places/toolbarDropMarker.png            (places/toolbarDropMarker.png)
-  skin/classic/browser/places/editBookmarkOverlay.css          (places/editBookmarkOverlay.css)
+  skin/classic/browser/places/editBookmark.css                 (places/editBookmark.css)
   skin/classic/browser/places/libraryToolbar.png               (places/libraryToolbar.png)
   skin/classic/browser/places/tag.png                          (places/tag.png)
   skin/classic/browser/places/allBookmarks.png                 (places/allBookmarks.png)
   skin/classic/browser/places/unsortedBookmarks.png            (places/unsortedBookmarks.png)
   skin/classic/browser/places/downloads.png                    (places/downloads.png)
   skin/classic/browser/places/livemark-item.png                (places/livemark-item.png)
   skin/classic/browser/preferences/alwaysAsk.png               (preferences/alwaysAsk.png)
   skin/classic/browser/preferences/application.png             (preferences/application.png)
rename from browser/themes/windows/places/editBookmarkOverlay.css
rename to browser/themes/windows/places/editBookmark.css
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/browser-window.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/browser-window.js
@@ -20,17 +20,17 @@ var globals = require("../globals");
 
 const rootDir = helpers.rootDir;
 
 // These are scripts not included in global-scripts.inc, but which are loaded
 // via overlays.
 const EXTRA_SCRIPTS = [
   "browser/base/content/nsContextMenu.js",
   "toolkit/content/contentAreaUtils.js",
-  "browser/components/places/content/editBookmarkOverlay.js",
+  "browser/components/places/content/editBookmark.js",
   "browser/components/downloads/content/downloads.js",
   "browser/components/downloads/content/indicator.js",
   // Via editMenuCommands.inc.xul
   "toolkit/content/editMenuOverlay.js"
 ];
 
 const extraDefinitions = [
   // Via Components.utils, defineModuleGetter, defineLazyModuleGetters or