Bug 1349723 - remove tests for about:addons UI in standalone window. r?aswan draft
authorRobert Helmer <rhelmer@mozilla.com>
Mon, 08 May 2017 15:57:42 -0700
changeset 576741 08749b732fde2c57924799ac9b5715223a8a91bb
parent 575894 3df2494ade45b92728a1e0e4c0ca257b162ff94c
child 628290 f208c94b9186e13e4e7b174216a6ecf43931e7e7
push id58462
push userrhelmer@mozilla.com
push dateFri, 12 May 2017 05:15:10 +0000
reviewersaswan
bugs1349723
milestone55.0a1
Bug 1349723 - remove tests for about:addons UI in standalone window. r?aswan MozReview-Commit-ID: GSz3OdDbFn3
toolkit/mozapps/extensions/test/browser/browser-window.ini
toolkit/mozapps/extensions/test/browser/browser_bug562797.js
toolkit/mozapps/extensions/test/browser/browser_bug567127.js
toolkit/mozapps/extensions/test/browser/browser_dragdrop.js
toolkit/mozapps/extensions/test/browser/browser_experiments.js
toolkit/mozapps/extensions/test/browser/browser_purchase.js
toolkit/mozapps/extensions/test/browser/browser_tabsettings.js
toolkit/mozapps/extensions/test/browser/browser_types.js
toolkit/mozapps/extensions/test/browser/head.js
toolkit/mozapps/extensions/test/browser/moz.build
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/browser/browser-window.ini
+++ /dev/null
@@ -1,52 +0,0 @@
-[DEFAULT]
-install-to-subdir = test-window
-support-files =
-  addons/*
-  addon_about.xul
-  addon_prefs.xul
-  cancelCompatCheck.sjs
-  discovery.html
-  discovery_frame.html
-  discovery_install.html
-  head.js
-  signed_hotfix.rdf
-  signed_hotfix.xpi
-  unsigned_hotfix.rdf
-  unsigned_hotfix.xpi
-  more_options.xul
-  options.xul
-  plugin_test.html
-  redirect.sjs
-  releaseNotes.xhtml
-  blockNoPlugins.xml
-  blockPluginHard.xml
-  browser_bug557956.rdf
-  browser_bug557956_8_2.xpi
-  browser_bug557956_9_2.xpi
-  browser_bug557956.xml
-  browser_bug591465.xml
-  browser_bug593535.xml
-  browser_searching.xml
-  browser_searching_empty.xml
-  browser_updatessl.rdf
-  browser_updatessl.rdf^headers^
-  browser_install.rdf
-  browser_install.rdf^headers^
-  browser_install.xml
-  browser_install1_3.xpi
-  browser_eula.xml
-  browser_purchase.xml
-  webapi_addon_listener.html
-  webapi_checkavailable.html
-  webapi_checkchromeframe.xul
-  webapi_checkframed.html
-  webapi_checknavigatedwindow.html
-  !/toolkit/mozapps/extensions/test/xpinstall/corrupt.xpi
-  !/toolkit/mozapps/extensions/test/xpinstall/incompatible.xpi
-  !/toolkit/mozapps/extensions/test/xpinstall/installtrigger.html
-  !/toolkit/mozapps/extensions/test/xpinstall/restartless.xpi
-  !/toolkit/mozapps/extensions/test/xpinstall/theme.xpi
-  !/toolkit/mozapps/extensions/test/xpinstall/unsigned.xpi
-  !/toolkit/mozapps/extensions/test/xpinstall/amosigned.xpi
-
-[include:browser-common.ini]
--- a/toolkit/mozapps/extensions/test/browser/browser_bug562797.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug562797.js
@@ -84,98 +84,79 @@ function test() {
 
   run_next_test();
 }
 
 function end_test() {
   finish();
 }
 
-function go_back(aManager) {
-  if (gUseInContentUI) {
-    gBrowser.goBack();
-  } else {
-    EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("back-btn"),
-                                       { }, aManager);
-  }
+function go_back() {
+  gBrowser.goBack();
 }
 
-function go_back_backspace(aManager) {
+function go_back_backspace() {
     EventUtils.synthesizeKey("VK_BACK_SPACE", {});
 }
 
-function go_forward_backspace(aManager) {
+function go_forward_backspace() {
     EventUtils.synthesizeKey("VK_BACK_SPACE", {shiftKey: true});
 }
 
-function go_forward(aManager) {
-  if (gUseInContentUI) {
-    gBrowser.goForward();
-  } else {
-    EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("forward-btn"),
-                                       { }, aManager);
-  }
+function go_forward() {
+  gBrowser.goForward();
 }
 
-function check_state(aManager, canGoBack, canGoForward) {
-  var doc = aManager.document;
-
-  if (gUseInContentUI) {
-    is(gBrowser.canGoBack, canGoBack, "canGoBack should be correct");
-    is(gBrowser.canGoForward, canGoForward, "canGoForward should be correct");
-  }
-
-  if (!is_hidden(doc.getElementById("back-btn"))) {
-    is(!doc.getElementById("back-btn").disabled, canGoBack, "Back button should have the right state");
-    is(!doc.getElementById("forward-btn").disabled, canGoForward, "Forward button should have the right state");
-  }
+function check_state(canGoBack, canGoForward) {
+  is(gBrowser.canGoBack, canGoBack, "canGoBack should be correct");
+  is(gBrowser.canGoForward, canGoForward, "canGoForward should be correct");
 }
 
 function is_in_list(aManager, view, canGoBack, canGoForward) {
   var doc = aManager.document;
 
   is(doc.getElementById("categories").selectedItem.value, view, "Should be on the right category");
   is(get_current_view(aManager).id, "list-view", "Should be on the right view");
 
-  check_state(aManager, canGoBack, canGoForward);
+  check_state(canGoBack, canGoForward);
 }
 
 function is_in_search(aManager, query, canGoBack, canGoForward) {
   var doc = aManager.document;
 
   is(doc.getElementById("categories").selectedItem.value, "addons://search/", "Should be on the right category");
   is(get_current_view(aManager).id, "search-view", "Should be on the right view");
   is(doc.getElementById("header-search").value, query, "Should have used the right query");
 
-  check_state(aManager, canGoBack, canGoForward);
+  check_state(canGoBack, canGoForward);
 }
 
 function is_in_detail(aManager, view, canGoBack, canGoForward) {
   var doc = aManager.document;
 
   is(doc.getElementById("categories").selectedItem.value, view, "Should be on the right category");
   is(get_current_view(aManager).id, "detail-view", "Should be on the right view");
 
-  check_state(aManager, canGoBack, canGoForward);
+  check_state(canGoBack, canGoForward);
 }
 
 function is_in_discovery(aManager, url, canGoBack, canGoForward) {
   var browser = aManager.document.getElementById("discover-browser");
 
   is(aManager.document.getElementById("discover-view").selectedPanel, browser,
      "Browser should be visible");
 
   var spec = browser.currentURI.spec;
   var pos = spec.indexOf("#");
   if (pos != -1)
     spec = spec.substring(0, pos);
 
   is(spec, url, "Should have loaded the right url");
 
-  check_state(aManager, canGoBack, canGoForward);
+  check_state(canGoBack, canGoForward);
 }
 
 function double_click_addon_element(aManager, aId) {
   var addon = get_addon_element(aManager, aId);
   addon.parentNode.ensureElementIsVisible(addon);
   EventUtils.synthesizeMouseAtCenter(addon, { clickCount: 1 }, aManager);
   EventUtils.synthesizeMouseAtCenter(addon, { clickCount: 2 }, aManager);
 }
@@ -188,63 +169,58 @@ add_test(function() {
     is_in_list(aManager, "addons://list/extension", false, false);
 
     EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("category-plugin"), { }, aManager);
 
     wait_for_view_load(aManager, function(aManager) {
       info("Part 2");
       is_in_list(aManager, "addons://list/plugin", true, false);
 
-      go_back(aManager);
+      go_back();
 
       wait_for_view_load(aManager, function(aManager) {
         info("Part 3");
         is_in_list(aManager, "addons://list/extension", false, true);
 
-        go_forward(aManager);
+        go_forward();
 
         wait_for_view_load(aManager, function(aManager) {
           info("Part 4");
           is_in_list(aManager, "addons://list/plugin", true, false);
 
-          go_back(aManager);
+          go_back();
 
           wait_for_view_load(aManager, function(aManager) {
             info("Part 5");
             is_in_list(aManager, "addons://list/extension", false, true);
 
             double_click_addon_element(aManager, "test1@tests.mozilla.org");
 
             wait_for_view_load(aManager, function(aManager) {
               info("Part 6");
               is_in_detail(aManager, "addons://list/extension", true, false);
 
-              go_back(aManager);
+              go_back();
 
               wait_for_view_load(aManager, function(aManager) {
                 info("Part 7");
                 is_in_list(aManager, "addons://list/extension", false, true);
 
                 close_manager(aManager, run_next_test);
               });
             });
           });
         });
       });
     });
   });
 });
 
 // Tests that browsing to the add-ons manager from a website and going back works
-// Only relevant for in-content UI
 add_test(function() {
-  if (!gUseInContentUI) {
-    run_next_test();
-    return;
-  }
 
   function promiseManagerLoaded(manager) {
     return new Promise(resolve => {
       wait_for_manager_load(manager, resolve);
     });
   }
 
   Task.spawn(function*() {
@@ -293,56 +269,56 @@ add_test(function() {
 });
 
 // Tests simple forward and back navigation and that the right heading and
 // category is selected -- Keyboard navigation [Bug 565359]
 // Only add the test if the backspace key navigates back and addon-manager
 // loaded in a tab
 add_test(function() {
 
-  if (!gUseInContentUI || (Services.prefs.getIntPref("browser.backspace_action") != 0)) {
+  if (Services.prefs.getIntPref("browser.backspace_action") != 0) {
     run_next_test();
     return;
   }
 
   open_manager("addons://list/extension", function(aManager) {
     info("Part 1");
     is_in_list(aManager, "addons://list/extension", false, false);
 
     EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("category-plugin"), { }, aManager);
 
     wait_for_view_load(aManager, function(aManager) {
       info("Part 2");
       is_in_list(aManager, "addons://list/plugin", true, false);
 
-      go_back_backspace(aManager);
+      go_back_backspace();
 
       wait_for_view_load(aManager, function(aManager) {
         info("Part 3");
         is_in_list(aManager, "addons://list/extension", false, true);
 
-        go_forward_backspace(aManager);
+        go_forward_backspace();
 
         wait_for_view_load(aManager, function(aManager) {
           info("Part 4");
           is_in_list(aManager, "addons://list/plugin", true, false);
 
-          go_back_backspace(aManager);
+          go_back_backspace();
 
           wait_for_view_load(aManager, function(aManager) {
             info("Part 5");
             is_in_list(aManager, "addons://list/extension", false, true);
 
             double_click_addon_element(aManager, "test1@tests.mozilla.org");
 
             wait_for_view_load(aManager, function(aManager) {
               info("Part 6");
               is_in_detail(aManager, "addons://list/extension", true, false);
 
-              go_back_backspace(aManager);
+              go_back_backspace();
 
               wait_for_view_load(aManager, function(aManager) {
                 info("Part 7");
                 is_in_list(aManager, "addons://list/extension", false, true);
 
                 close_manager(aManager, run_next_test);
               });
             });
@@ -361,17 +337,17 @@ add_test(function() {
     is_in_list(aManager, "addons://list/plugin", false, false);
 
     EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("category-extension"), { }, aManager);
 
     wait_for_view_load(aManager, function(aManager) {
       info("Part 2");
       is_in_list(aManager, "addons://list/extension", true, false);
 
-      go_back(aManager);
+      go_back();
 
       wait_for_view_load(aManager, function(aManager) {
         info("Part 3");
         is_in_list(aManager, "addons://list/plugin", false, true);
 
         close_manager(aManager, run_next_test);
       });
     });
@@ -387,82 +363,77 @@ add_test(function() {
     is_in_list(aManager, "addons://list/extension", false, false);
 
     aManager.loadView("addons://list/plugin");
 
     wait_for_view_load(aManager, function(aManager) {
       info("Part 2");
       is_in_list(aManager, "addons://list/plugin", true, false);
 
-      go_back(aManager);
+      go_back();
 
       wait_for_view_load(aManager, function(aManager) {
         info("Part 3");
         is_in_list(aManager, "addons://list/extension", false, true);
 
-        go_forward(aManager);
+        go_forward();
 
         wait_for_view_load(aManager, function(aManager) {
           info("Part 4");
           is_in_list(aManager, "addons://list/plugin", true, false);
 
           close_manager(aManager, run_next_test);
         });
       });
     });
   });
 });
 
 // Tests than navigating to a website and then going back returns to the
 // previous view
-// Only relevant for in-content UI
 add_test(function() {
-  if (!gUseInContentUI) {
-    run_next_test();
-    return;
-  }
 
   open_manager("addons://list/plugin", function(aManager) {
     info("Part 1");
     is_in_list(aManager, "addons://list/plugin", false, false);
 
     gBrowser.loadURI("http://example.com/");
     gBrowser.addEventListener("pageshow", function(event) {
       if (event.target.location != "http://example.com/")
         return;
       gBrowser.removeEventListener("pageshow", arguments.callee);
       info("Part 2");
 
       executeSoon(function() {
         ok(gBrowser.canGoBack, "Should be able to go back");
         ok(!gBrowser.canGoForward, "Should not be able to go forward");
 
-        go_back(aManager);
+        go_back();
 
         gBrowser.addEventListener("pageshow", function(event) {
           if (event.target.location != "about:addons")
             return;
           gBrowser.removeEventListener("pageshow", arguments.callee);
 
           wait_for_view_load(gBrowser.contentWindow.wrappedJSObject, function(aManager) {
             info("Part 3");
             is_in_list(aManager, "addons://list/plugin", false, true);
 
-            executeSoon(() => go_forward(aManager));
+            executeSoon(() => go_forward());
             gBrowser.addEventListener("pageshow", function(event) {
               if (event.target.location != "http://example.com/")
                 return;
               gBrowser.removeEventListener("pageshow", arguments.callee);
               info("Part 4");
 
               executeSoon(function() {
                 ok(gBrowser.canGoBack, "Should be able to go back");
                 ok(!gBrowser.canGoForward, "Should not be able to go forward");
 
-                go_back(aManager);
+                go_back();
 
                 gBrowser.addEventListener("pageshow", function(event) {
                   if (event.target.location != "about:addons")
                     return;
                   gBrowser.removeEventListener("pageshow", arguments.callee);
                   wait_for_view_load(gBrowser.contentWindow.wrappedJSObject, function(aManager) {
                     info("Part 5");
                     is_in_list(aManager, "addons://list/plugin", false, true);
@@ -509,51 +480,48 @@ add_test(function() {
       EventUtils.synthesizeMouseAtCenter(localFilter, { }, aManager);
 
       is(localFilter.selected, true, "Should have changed to local filter");
 
       // Now we continue with the normal test.
 
       info("Part 2");
       is_in_search(aManager, "bar", true, false);
+      // force layout flush
+      aManager.document.documentElement.clientTop;
       check_all_in_list(aManager, ["test2@tests.mozilla.org", "test3@tests.mozilla.org"]);
 
       double_click_addon_element(aManager, "test2@tests.mozilla.org");
 
       wait_for_view_load(aManager, function(aManager) {
         info("Part 3");
         is_in_detail(aManager, "addons://search/", true, false);
 
-        go_back(aManager);
+        go_back();
         wait_for_view_load(aManager, function(aManager) {
           info("Part 4");
           is_in_search(aManager, "bar", true, true);
           check_all_in_list(aManager, ["test2@tests.mozilla.org", "test3@tests.mozilla.org"]);
 
-          go_forward(aManager);
+          go_forward();
           wait_for_view_load(aManager, function(aManager) {
             info("Part 5");
             is_in_detail(aManager, "addons://search/", true, false);
 
             close_manager(aManager, run_next_test);
           });
         });
       });
     });
   });
 });
 
 // Tests that going back from a webpage to a detail view loaded from a search
 // result works
-// Only relevant for in-content UI
 add_test(function() {
-  if (!gUseInContentUI) {
-    run_next_test();
-    return;
-  }
 
   open_manager("addons://list/extension", function(aManager) {
     info("Part 1");
     is_in_list(aManager, "addons://list/extension", false, false);
 
     var search = aManager.document.getElementById("header-search");
     search.focus();
     search.value = "bar";
@@ -576,27 +544,27 @@ add_test(function() {
             return;
           gBrowser.removeEventListener("pageshow", arguments.callee);
 
           info("Part 4");
           executeSoon(function() {
             ok(gBrowser.canGoBack, "Should be able to go back");
             ok(!gBrowser.canGoForward, "Should not be able to go forward");
 
-            go_back(aManager);
+            go_back();
             gBrowser.addEventListener("pageshow", function(event) {
                 if (event.target.location != "about:addons")
                 return;
               gBrowser.removeEventListener("pageshow", arguments.callee);
 
               wait_for_view_load(gBrowser.contentWindow.wrappedJSObject, function(aManager) {
                 info("Part 5");
                 is_in_detail(aManager, "addons://search/", true, true);
 
-                go_back(aManager);
+                go_back();
                 wait_for_view_load(aManager, function(aManager) {
                   info("Part 6");
                   is_in_search(aManager, "bar", true, true);
                   check_all_in_list(aManager, ["test2@tests.mozilla.org", "test3@tests.mozilla.org"]);
 
                   close_manager(aManager, run_next_test);
                 });
               });
@@ -604,22 +572,17 @@ add_test(function() {
           });
         });
       });
     });
   });
 });
 
 // Tests that refreshing a list view does not affect the history
-// Only relevant for in-content UI
 add_test(function() {
-  if (!gUseInContentUI) {
-    run_next_test();
-    return;
-  }
 
   open_manager("addons://list/extension", function(aManager) {
     info("Part 1");
     is_in_list(aManager, "addons://list/extension", false, false);
 
     EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("category-plugin"), { }, aManager);
 
     wait_for_view_load(aManager, function(aManager) {
@@ -631,36 +594,31 @@ add_test(function() {
         if (event.target.location != "about:addons")
           return;
         gBrowser.removeEventListener("pageshow", arguments.callee);
 
         wait_for_view_load(gBrowser.contentWindow.wrappedJSObject, function(aManager) {
           info("Part 3");
           is_in_list(aManager, "addons://list/plugin", true, false);
 
-          go_back(aManager);
+          go_back();
           wait_for_view_load(aManager, function(aManager) {
             info("Part 4");
             is_in_list(aManager, "addons://list/extension", false, true);
 
             close_manager(aManager, run_next_test);
           });
         });
       });
     });
   });
 });
 
 // Tests that refreshing a detail view does not affect the history
-// Only relevant for in-content UI
 add_test(function() {
-  if (!gUseInContentUI) {
-    run_next_test();
-    return;
-  }
 
   open_manager(null, function(aManager) {
     info("Part 1");
     is_in_list(aManager, "addons://list/extension", false, false);
 
     double_click_addon_element(aManager, "test1@tests.mozilla.org");
 
     wait_for_view_load(aManager, function(aManager) {
@@ -672,17 +630,17 @@ add_test(function() {
         if (event.target.location != "about:addons")
           return;
         gBrowser.removeEventListener("pageshow", arguments.callee);
 
         wait_for_view_load(gBrowser.contentWindow.wrappedJSObject, function(aManager) {
           info("Part 3");
           is_in_detail(aManager, "addons://list/extension", true, false);
 
-          go_back(aManager);
+          go_back();
           wait_for_view_load(aManager, function(aManager) {
             info("Part 4");
             is_in_list(aManager, "addons://list/extension", false, true);
 
             close_manager(aManager, run_next_test);
           });
         });
       });
@@ -702,53 +660,26 @@ add_test(function() {
     wait_for_view_load(aManager, function(aManager) {
       info("Part 2");
       is_in_detail(aManager, "addons://list/extension", true, false);
 
       EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("detail-uninstall-btn"),
                                          { }, aManager);
 
       wait_for_view_load(aManager, function() {
-        if (gUseInContentUI) {
-          // TODO until bug 590661 is fixed the back button will be enabled
-          // when displaying in content
-          is_in_list(aManager, "addons://list/extension", true, false);
-        } else {
-          is_in_list(aManager, "addons://list/extension", false, false);
-        }
+        // TODO until bug 590661 is fixed the back button will be enabled
+        // when displaying in content
+        is_in_list(aManager, "addons://list/extension", true, false);
 
         close_manager(aManager, run_next_test);
       });
     });
   });
 });
 
-// Tests that the back and forward buttons only show up for windowed mode
-add_test(function() {
-  open_manager(null, function(aManager) {
-    var doc = aManager.document;
-
-    if (gUseInContentUI) {
-      var btn = document.getElementById("back-button");
-      if (!btn || is_hidden(btn)) {
-        is_element_visible(doc.getElementById("back-btn"), "Back button should not be hidden");
-        is_element_visible(doc.getElementById("forward-btn"), "Forward button should not be hidden");
-      } else {
-        is_element_hidden(doc.getElementById("back-btn"), "Back button should be hidden");
-        is_element_hidden(doc.getElementById("forward-btn"), "Forward button should be hidden");
-      }
-    } else {
-      is_element_visible(doc.getElementById("back-btn"), "Back button should not be hidden");
-      is_element_visible(doc.getElementById("forward-btn"), "Forward button should not be hidden");
-    }
-
-    close_manager(aManager, run_next_test);
-  });
-});
-
 // Tests that opening the manager opens the last view
 add_test(function() {
   open_manager("addons://list/plugin", function(aManager) {
     info("Part 1");
     is_in_list(aManager, "addons://list/plugin", false, false);
 
     close_manager(aManager, function() {
       open_manager(null, function(aManager) {
@@ -778,36 +709,36 @@ add_test(function() {
         waitForLoad(aManager, function() {
           is_in_discovery(aManager, SECOND_URL, true, false);
 
           EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("category-plugin"), { }, aManager);
 
           wait_for_view_load(aManager, function(aManager) {
             is_in_list(aManager, "addons://list/plugin", true, false);
 
-            go_back(aManager);
+            go_back();
 
             wait_for_view_load(aManager, function(aManager) {
               is_in_discovery(aManager, SECOND_URL, true, true);
 
-              go_back(aManager);
+              go_back();
 
               waitForLoad(aManager, function() {
                 is_in_discovery(aManager, MAIN_URL, false, true);
 
                 close_manager(aManager, run_next_test);
               });
             });
           });
         });
 
-        go_forward(aManager);
+        go_forward();
       });
 
-      go_back(aManager);
+      go_back();
     });
   });
 });
 
 // Tests that navigating the discovery page works when that was the second view
 add_test(function() {
   open_manager("addons://list/plugin", function(aManager) {
     is_in_list(aManager, "addons://list/plugin", false, false);
@@ -826,66 +757,62 @@ add_test(function() {
           waitForLoad(aManager, function() {
             is_in_discovery(aManager, SECOND_URL, true, false);
 
             EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("category-plugin"), { }, aManager);
 
             wait_for_view_load(aManager, function(aManager) {
               is_in_list(aManager, "addons://list/plugin", true, false);
 
-              go_back(aManager);
+              go_back();
 
               wait_for_view_load(aManager, function(aManager) {
                 is_in_discovery(aManager, SECOND_URL, true, true);
 
-                go_back(aManager);
+                go_back();
 
                 waitForLoad(aManager, function() {
                   is_in_discovery(aManager, MAIN_URL, true, true);
 
-                  go_back(aManager);
+                  go_back();
 
                   wait_for_view_load(aManager, function(aManager) {
                     is_in_list(aManager, "addons://list/plugin", false, true);
 
-                    go_forward(aManager);
+                    go_forward();
 
                     wait_for_view_load(aManager, function(aManager) {
                       is_in_discovery(aManager, MAIN_URL, true, true);
 
                       waitForLoad(aManager, function() {
                         is_in_discovery(aManager, SECOND_URL, true, true);
 
                         close_manager(aManager, run_next_test);
                       });
 
-                      go_forward(aManager);
+                      go_forward();
                     });
                   });
                 });
               });
             });
           });
 
-          go_forward(aManager);
+          go_forward();
         });
 
-        go_back(aManager);
+        go_back();
       });
     });
   });
 });
 
 // Tests that when displaying in-content and opened in the background the back
 // and forward buttons still appear when switching tabs
 add_test(function() {
-  if (!gUseInContentUI) {
-    run_next_test();
-    return;
-  }
 
   var tab = gBrowser.addTab("about:addons");
   var browser = gBrowser.getBrowserForTab(tab);
 
   browser.addEventListener("pageshow", function(event) {
     if (event.target.location.href != "about:addons")
       return;
     browser.removeEventListener("pageshow", arguments.callee, true);
@@ -923,48 +850,48 @@ add_test(function() {
       clickLink(aManager, "link-good", function() {
         is_in_discovery(aManager, SECOND_URL, true, false);
 
         EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("category-discover"), { }, aManager);
 
         waitForLoad(aManager, function() {
           is_in_discovery(aManager, MAIN_URL, true, false);
 
-          go_back(aManager);
+          go_back();
 
           waitForLoad(aManager, function() {
             is_in_discovery(aManager, SECOND_URL, true, true);
 
-            go_back(aManager);
+            go_back();
 
             waitForLoad(aManager, function() {
               is_in_discovery(aManager, MAIN_URL, true, true);
 
-              go_back(aManager);
+              go_back();
 
               wait_for_view_load(aManager, function(aManager) {
                 is_in_list(aManager, "addons://list/plugin", false, true);
 
-                go_forward(aManager);
+                go_forward();
 
                 wait_for_view_load(aManager, function(aManager) {
                   is_in_discovery(aManager, MAIN_URL, true, true);
 
                   waitForLoad(aManager, function() {
                     is_in_discovery(aManager, SECOND_URL, true, true);
 
                     waitForLoad(aManager, function() {
                       is_in_discovery(aManager, MAIN_URL, true, false);
 
                       close_manager(aManager, run_next_test);
                     });
-                    go_forward(aManager);
+                    go_forward();
                   });
 
-                  go_forward(aManager);
+                  go_forward();
                 });
               });
             });
           });
         });
       });
     });
   });
--- a/toolkit/mozapps/extensions/test/browser/browser_bug567127.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug567127.js
@@ -12,20 +12,17 @@ var gManagerWindow;
 function checkInstallConfirmation(...urls) {
   return new Promise(resolve => {
     let nurls = urls.length;
 
     let notificationCount = 0;
     let observer = {
       observe(aSubject, aTopic, aData) {
         var installInfo = aSubject.wrappedJSObject;
-        if (gTestInWindow)
-          is(installInfo.browser, null, "Notification should have a null browser");
-        else
-          isnot(installInfo.browser, null, "Notification should have non-null browser");
+        isnot(installInfo.browser, null, "Notification should have non-null browser");
         notificationCount++;
       }
     };
     Services.obs.addObserver(observer, "addon-install-started");
 
     let windows = new Set();
 
     function handleDialog(window) {
--- a/toolkit/mozapps/extensions/test/browser/browser_dragdrop.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_dragdrop.js
@@ -18,20 +18,17 @@ this._scriptLoader.loadSubScript("chrome
 
 function checkInstallConfirmation(...urls) {
   let nurls = urls.length;
 
   let notificationCount = 0;
   let observer = {
     observe(aSubject, aTopic, aData) {
       var installInfo = aSubject.wrappedJSObject;
-      if (gTestInWindow)
-        is(installInfo.browser, null, "Notification should have a null browser");
-      else
-        isnot(installInfo.browser, null, "Notification should have non-null browser");
+      isnot(installInfo.browser, null, "Notification should have non-null browser");
       notificationCount++;
     }
   };
   Services.obs.addObserver(observer, "addon-install-started");
 
   let windows = new Set();
 
   function handleDialog(window) {
--- a/toolkit/mozapps/extensions/test/browser/browser_experiments.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_experiments.js
@@ -145,23 +145,16 @@ add_task(function* testActiveExperiment(
 add_task(function* testExperimentLearnMore() {
   // Actual URL is irrelevant.
   Services.prefs.setCharPref("toolkit.telemetry.infoURL",
                              "http://mochi.test:8888/server.js");
 
   yield gCategoryUtilities.openType("experiment");
   let btn = gManagerWindow.document.getElementById("experiments-learn-more");
 
-  if (!gUseInContentUI) {
-    is_element_hidden(btn, "Learn more button hidden if not using in-content UI.");
-    Services.prefs.clearUserPref("toolkit.telemetry.infoURL");
-
-    return;
-  }
-
   is_element_visible(btn, "Learn more button visible.");
 
   let deferred = Promise.defer();
   window.addEventListener("DOMContentLoaded", function onLoad(event) {
     info("Telemetry privacy policy window opened.");
     window.removeEventListener("DOMContentLoaded", onLoad);
 
     let browser = gBrowser.selectedBrowser;
@@ -178,21 +171,16 @@ add_task(function* testExperimentLearnMo
   EventUtils.synthesizeMouseAtCenter(btn, {}, gManagerWindow);
 
   yield deferred.promise;
 });
 
 add_task(function* testOpenPreferences() {
   yield gCategoryUtilities.openType("experiment");
   let btn = gManagerWindow.document.getElementById("experiments-change-telemetry");
-  if (!gUseInContentUI) {
-    is_element_hidden(btn, "Change telemetry button not enabled in out of window UI.");
-    info("Skipping preferences open test because not using in-content UI.");
-    return;
-  }
 
   is_element_visible(btn, "Change telemetry button visible in in-content UI.");
 
   let deferred = Promise.defer();
   Services.obs.addObserver(function observer(prefWin, topic, data) {
     Services.obs.removeObserver(observer, "advanced-pane-loaded");
     info("Advanced preference pane opened.");
     executeSoon(function() {
--- a/toolkit/mozapps/extensions/test/browser/browser_purchase.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_purchase.js
@@ -140,22 +140,18 @@ add_test(function() {
     function wantLoad(url) {
       return url != "about:blank";
     }
     BrowserTestUtils.browserLoaded(event.target.linkedBrowser, false, wantLoad).then(() => {
       is(gBrowser.currentURI.spec, TESTROOT + "releaseNotes.xhtml?addon5", "Should have loaded the right page");
 
       gBrowser.removeCurrentTab();
 
-      if (gUseInContentUI) {
-        is(gBrowser.currentURI.spec, "about:addons", "Should be back to the add-ons manager");
-        run_next_test();
-      } else {
-        waitForFocus(run_next_test, gManagerWindow);
-      }
+      is(gBrowser.currentURI.spec, "about:addons", "Should be back to the add-ons manager");
+      run_next_test();
     });
   }, {capture: true, once: true});
 
   var list = gManagerWindow.document.getElementById("search-list");
   EventUtils.synthesizeMouseAtCenter(get_purchase_btn(list.firstChild), { }, gManagerWindow);
 });
 
 // Tests that clicking the buy button from the details view works
@@ -164,22 +160,18 @@ add_test(function() {
     function wantLoad(url) {
       return url != "about:blank";
     }
     BrowserTestUtils.browserLoaded(event.target.linkedBrowser, false, wantLoad).then(() => {
       is(gBrowser.currentURI.spec, TESTROOT + "releaseNotes.xhtml?addon4", "Should have loaded the right page");
 
       gBrowser.removeCurrentTab();
 
-      if (gUseInContentUI) {
-        is(gBrowser.currentURI.spec, "about:addons", "Should be back to the add-ons manager");
-        run_next_test();
-      } else {
-        waitForFocus(run_next_test, gManagerWindow);
-      }
+      is(gBrowser.currentURI.spec, "about:addons", "Should be back to the add-ons manager");
+      run_next_test();
     });
   }, {capture: true, once: true});
 
   var list = gManagerWindow.document.getElementById("search-list");
   var item = list.firstChild.nextSibling;
   list.ensureElementIsVisible(item);
   EventUtils.synthesizeMouseAtCenter(item, { clickCount: 1 }, gManagerWindow);
   EventUtils.synthesizeMouseAtCenter(item, { clickCount: 2 }, gManagerWindow);
--- a/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js
@@ -36,62 +36,17 @@ function end_test() {
 add_test(function() {
   var addon = get_addon_element(gManagerWindow, "tabsettings@tests.mozilla.org");
   is(addon.mAddon.optionsType, AddonManager.OPTIONS_TYPE_TAB, "Options should be inline type");
   addon.parentNode.ensureElementIsVisible(addon);
 
   var button = gManagerWindow.document.getAnonymousElementByAttribute(addon, "anonid", "preferences-btn");
   is_element_visible(button, "Preferences button should be visible");
 
-  if (gUseInContentUI) {
-    EventUtils.synthesizeMouseAtCenter(button, { clickCount: 1 }, gManagerWindow);
-
-    var browser = gBrowser.selectedBrowser;
-    browser.addEventListener("DOMContentLoaded", function() {
-      is(browser.currentURI.spec, addon.mAddon.optionsURL, "New tab should have loaded the options URL");
-      browser.contentWindow.close();
-      run_next_test();
-    }, {once: true});
-    return;
-  }
-
-  let instantApply = Services.prefs.getBoolPref("browser.preferences.instantApply");
+  EventUtils.synthesizeMouseAtCenter(button, { clickCount: 1 }, gManagerWindow);
 
-  function observer(aSubject, aTopic, aData) {
-    switch (aTopic) {
-      case "domwindowclosed":
-        // Give the preference window a chance to finish closing before
-        // closing the add-ons manager.
-        waitForFocus(function() {
-          Services.ww.unregisterNotification(observer);
-          run_next_test();
-        });
-        break;
-      case "domwindowopened":
-        let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
-        waitForFocus(function() {
-          // If the openDialog privileges are wrong a new browser window
-          // will open, let the test proceed (and fail) rather than timeout.
-          if (win.location != addon.mAddon.optionsURL &&
-              win.location != "chrome://browser/content/browser.xul")
-            return;
-
-          is(win.location, addon.mAddon.optionsURL,
-             "The correct addon pref window should have opened");
-
-          let chromeFlags = win.QueryInterface(Ci.nsIInterfaceRequestor).
-                                getInterface(Ci.nsIWebNavigation).
-                                QueryInterface(Ci.nsIDocShellTreeItem).treeOwner.
-                                QueryInterface(Ci.nsIInterfaceRequestor).
-                                getInterface(Ci.nsIXULWindow).chromeFlags;
-          ok(chromeFlags & Ci.nsIWebBrowserChrome.CHROME_OPENAS_CHROME &&
-             (instantApply || chromeFlags & Ci.nsIWebBrowserChrome.CHROME_OPENAS_DIALOG),
-             "Window was open as a chrome dialog.");
-
-          win.close();
-        }, win);
-        break;
-    }
-  }
-
-  Services.ww.registerNotification(observer);
-  EventUtils.synthesizeMouseAtCenter(button, { clickCount: 1 }, gManagerWindow);
+  var browser = gBrowser.selectedBrowser;
+  browser.addEventListener("DOMContentLoaded", function() {
+    is(browser.currentURI.spec, addon.mAddon.optionsURL, "New tab should have loaded the options URL");
+    browser.contentWindow.close();
+    run_next_test();
+  }, {once: true});
 });
--- a/toolkit/mozapps/extensions/test/browser/browser_types.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_types.js
@@ -21,45 +21,26 @@ var gTypes = [
     id: "type3",
     name: "Type 3",
     uiPriority: 5200,
     viewType: AddonManager.VIEW_TYPE_LIST
   }
 ];
 
 function go_back(aManager) {
-  if (gUseInContentUI) {
-    gBrowser.goBack();
-  } else {
-    EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("back-btn"),
-                                       { }, aManager);
-  }
+  gBrowser.goBack();
 }
 
 function go_forward(aManager) {
-  if (gUseInContentUI) {
-    gBrowser.goForward();
-  } else {
-    EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("forward-btn"),
-                                       { }, aManager);
-  }
+  gBrowser.goForward();
 }
 
-function check_state(aManager, canGoBack, canGoForward) {
-  var doc = aManager.document;
-
-  if (gUseInContentUI) {
-    is(gBrowser.canGoBack, canGoBack, "canGoBack should be correct");
-    is(gBrowser.canGoForward, canGoForward, "canGoForward should be correct");
-  }
-
-  if (!is_hidden(doc.getElementById("back-btn"))) {
-    is(!doc.getElementById("back-btn").disabled, canGoBack, "Back button should have the right state");
-    is(!doc.getElementById("forward-btn").disabled, canGoForward, "Forward button should have the right state");
-  }
+function check_state(canGoBack, canGoForward) {
+  is(gBrowser.canGoBack, canGoBack, "canGoBack should be correct");
+  is(gBrowser.canGoForward, canGoForward, "canGoForward should be correct");
 }
 
 function test() {
   waitForExplicitFinish();
 
   run_next_test();
 }
 
@@ -145,46 +126,46 @@ add_test(function() {
 // Remove the type while it is beng viewed and check it is replaced with the
 // default view
 add_test(function() {
   gCategoryUtilities.openType("type1", function() {
     gCategoryUtilities.openType("plugin", function() {
       go_back(gManagerWindow);
       wait_for_view_load(gManagerWindow, function() {
         is(gCategoryUtilities.selectedCategory, "type1", "Should be showing the custom view");
-        check_state(gManagerWindow, true, true);
+        check_state(true, true);
 
         AddonManagerPrivate.unregisterProvider(gProvider);
 
         ok(!gCategoryUtilities.get("type1", true), "Type 1 should be absent");
         ok(!gCategoryUtilities.get("type2", true), "Type 2 should be absent");
         ok(!gCategoryUtilities.get("missing1", true), "Missing 1 should be absent");
 
         is(gCategoryUtilities.selectedCategory, "discover", "Should be back to the default view");
-        check_state(gManagerWindow, true, true);
+        check_state(true, true);
 
         go_back(gManagerWindow);
         wait_for_view_load(gManagerWindow, function() {
           is(gCategoryUtilities.selectedCategory, "extension", "Should be showing the extension view");
-          check_state(gManagerWindow, false, true);
+          check_state(false, true);
 
           go_forward(gManagerWindow);
           wait_for_view_load(gManagerWindow, function() {
             is(gCategoryUtilities.selectedCategory, "discover", "Should be back to the default view");
-            check_state(gManagerWindow, true, true);
+            check_state(true, true);
 
             go_forward(gManagerWindow);
             wait_for_view_load(gManagerWindow, function() {
               is(gCategoryUtilities.selectedCategory, "plugin", "Should be back to the plugins view");
-              check_state(gManagerWindow, true, false);
+              check_state(true, false);
 
               go_back(gManagerWindow);
               wait_for_view_load(gManagerWindow, function() {
                 is(gCategoryUtilities.selectedCategory, "discover", "Should be back to the default view");
-                check_state(gManagerWindow, true, true);
+                check_state(true, true);
 
                 close_manager(gManagerWindow, run_next_test);
               });
             });
           });
         });
       });
     });
@@ -207,17 +188,17 @@ add_test(function() {
         AddonManagerPrivate.unregisterProvider(gProvider);
 
         ok(!gCategoryUtilities.get("type1", true), "Type 1 should not be present");
 
         go_back(gManagerWindow);
 
         wait_for_view_load(gManagerWindow, function() {
           is(gCategoryUtilities.selectedCategory, "extension", "Should be back to the first view");
-          check_state(gManagerWindow, false, true);
+          check_state(false, true);
 
           close_manager(gManagerWindow, run_next_test);
         });
       });
     });
   });
 });
 
@@ -243,17 +224,17 @@ add_test(function() {
             AddonManagerPrivate.unregisterProvider(gProvider);
 
             ok(!gCategoryUtilities.get("type1", true), "Type 1 should not be present");
 
             go_forward(gManagerWindow);
 
             wait_for_view_load(gManagerWindow, function() {
               is(gCategoryUtilities.selectedCategory, "plugin", "Should be back to the plugin view");
-              check_state(gManagerWindow, true, false);
+              check_state(true, false);
 
               close_manager(gManagerWindow, run_next_test);
             });
           });
         });
       });
     });
   });
@@ -276,17 +257,17 @@ add_test(function() {
       AddonManagerPrivate.unregisterProvider(gProvider);
 
       ok(!gCategoryUtilities.get("type1", true), "Type 1 should not be present");
 
       go_back(gManagerWindow);
 
       wait_for_view_load(gManagerWindow, function() {
         is(gCategoryUtilities.selectedCategory, "discover", "Should be at the default view");
-        check_state(gManagerWindow, false, true);
+        check_state(false, true);
 
         close_manager(gManagerWindow, run_next_test);
       });
     });
   });
 });
 
 // Test that when going forward to a now missing category and we can't go
@@ -310,17 +291,17 @@ add_test(function() {
         AddonManagerPrivate.unregisterProvider(gProvider);
 
         ok(!gCategoryUtilities.get("type1", true), "Type 1 should not be present");
 
         go_forward(gManagerWindow);
 
         wait_for_view_load(gManagerWindow, function() {
           is(gCategoryUtilities.selectedCategory, "discover", "Should be at the default view");
-          check_state(gManagerWindow, true, false);
+          check_state(true, false);
 
           close_manager(gManagerWindow, run_next_test);
         });
       });
     });
   });
 });
 
@@ -341,17 +322,17 @@ add_test(function() {
           AddonManagerPrivate.unregisterProvider(gProvider);
 
           ok(!gCategoryUtilities.get("type1", true), "Type 1 should not be present");
 
           go_back(gManagerWindow);
 
           wait_for_view_load(gManagerWindow, function() {
             is(gCategoryUtilities.selectedCategory, "extension", "Should be back to the first view");
-            check_state(gManagerWindow, false, true);
+            check_state(false, true);
 
             close_manager(gManagerWindow, run_next_test);
           });
         });
       });
     });
   });
 });
@@ -381,17 +362,17 @@ add_test(function() {
                 AddonManagerPrivate.unregisterProvider(gProvider);
 
                 ok(!gCategoryUtilities.get("type1", true), "Type 1 should not be present");
 
                 go_forward(gManagerWindow);
 
                 wait_for_view_load(gManagerWindow, function() {
                   is(gCategoryUtilities.selectedCategory, "plugin", "Should be back to the plugin view");
-                  check_state(gManagerWindow, true, false);
+                  check_state(true, false);
 
                   close_manager(gManagerWindow, run_next_test);
                 });
               });
             });
           });
         });
       });
@@ -417,17 +398,17 @@ add_test(function() {
         AddonManagerPrivate.unregisterProvider(gProvider);
 
         ok(!gCategoryUtilities.get("type1", true), "Type 1 should not be present");
 
         go_back(gManagerWindow);
 
         wait_for_view_load(gManagerWindow, function() {
           is(gCategoryUtilities.selectedCategory, "discover", "Should be at the default view");
-          check_state(gManagerWindow, false, true);
+          check_state(false, true);
 
           close_manager(gManagerWindow, run_next_test);
         });
       });
     });
   });
 });
 
@@ -456,17 +437,17 @@ add_test(function() {
             AddonManagerPrivate.unregisterProvider(gProvider);
 
             ok(!gCategoryUtilities.get("type1", true), "Type 1 should not be present");
 
             go_forward(gManagerWindow);
 
             wait_for_view_load(gManagerWindow, function() {
               is(gCategoryUtilities.selectedCategory, "discover", "Should be at the default view");
-              check_state(gManagerWindow, true, false);
+              check_state(true, false);
 
               close_manager(gManagerWindow, run_next_test);
             });
           });
         });
       });
     });
   });
--- a/toolkit/mozapps/extensions/test/browser/head.js
+++ b/toolkit/mozapps/extensions/test/browser/head.js
@@ -13,23 +13,16 @@ Components.utils.import("resource://gre/
 var AddonManager = tmp.AddonManager;
 var AddonManagerPrivate = tmp.AddonManagerPrivate;
 var Log = tmp.Log;
 
 var pathParts = gTestPath.split("/");
 // Drop the test filename
 pathParts.splice(pathParts.length - 1, pathParts.length);
 
-var gTestInWindow = /-window$/.test(pathParts[pathParts.length - 1]);
-
-// Drop the UI type
-if (gTestInWindow) {
-  pathParts.splice(pathParts.length - 1, pathParts.length);
-}
-
 const RELATIVE_DIR = pathParts.slice(4).join("/") + "/";
 
 const TESTROOT = "http://example.com/" + RELATIVE_DIR;
 const SECURE_TESTROOT = "https://example.com/" + RELATIVE_DIR;
 const TESTROOT2 = "http://example.org/" + RELATIVE_DIR;
 const SECURE_TESTROOT2 = "https://example.org/" + RELATIVE_DIR;
 const CHROMEROOT = pathParts.join("/") + "/";
 const PREF_DISCOVERURL = "extensions.webservice.discoverURL";
@@ -59,18 +52,16 @@ var PREF_CHECK_COMPATIBILITY;
   }
   PREF_CHECK_COMPATIBILITY = "extensions.checkCompatibility." + version;
 })();
 
 var gPendingTests = [];
 var gTestsRun = 0;
 var gTestStart = null;
 
-var gUseInContentUI = !gTestInWindow && ("switchToTabHavingURI" in window);
-
 var gRestorePrefs = [{name: PREF_LOGGING_ENABLED},
                      {name: PREF_CUSTOM_XPINSTALL_CONFIRMATION_UI},
                      {name: "extensions.webservice.discoverURL"},
                      {name: "extensions.update.url"},
                      {name: "extensions.update.background.url"},
                      {name: "extensions.update.enabled"},
                      {name: "extensions.update.autoUpdateDefault"},
                      {name: "extensions.getAddons.get.url"},
@@ -402,38 +393,28 @@ function open_manager(aView, aCallback, 
           info("Manager waiting for view load");
           wait_for_view_load(aManagerWindow, function() {
             resolve(aManagerWindow);
           }, null, aLongerTimeout);
         });
       }, aManagerWindow);
     }
 
-    if (gUseInContentUI) {
-      info("Loading manager window in tab");
-      Services.obs.addObserver(function(aSubject, aTopic, aData) {
-        Services.obs.removeObserver(arguments.callee, aTopic);
-        if (aSubject.location.href != MANAGER_URI) {
-          info("Ignoring load event for " + aSubject.location.href);
-          return;
-        }
-        setup_manager(aSubject);
-      }, "EM-loaded");
+    info("Loading manager window in tab");
+    Services.obs.addObserver(function(aSubject, aTopic, aData) {
+      Services.obs.removeObserver(arguments.callee, aTopic);
+      if (aSubject.location.href != MANAGER_URI) {
+        info("Ignoring load event for " + aSubject.location.href);
+        return;
+      }
+      setup_manager(aSubject);
+    }, "EM-loaded");
 
-      gBrowser.selectedTab = gBrowser.addTab();
-      switchToTabHavingURI(MANAGER_URI, true);
-    } else {
-      info("Loading manager window in dialog");
-      Services.obs.addObserver(function(aSubject, aTopic, aData) {
-        Services.obs.removeObserver(arguments.callee, aTopic);
-        setup_manager(aSubject);
-      }, "EM-loaded");
-
-      openDialog(MANAGER_URI);
-    }
+    gBrowser.selectedTab = gBrowser.addTab();
+    switchToTabHavingURI(MANAGER_URI, true);
   });
 
   // The promise resolves with the manager window, so it is passed to the callback
   return log_callback(p, aCallback);
 }
 
 function close_manager(aManagerWindow, aCallback, aLongerTimeout) {
   let p = new Promise((resolve, reject) => {
--- a/toolkit/mozapps/extensions/test/browser/moz.build
+++ b/toolkit/mozapps/extensions/test/browser/moz.build
@@ -1,10 +1,9 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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_CHROME_MANIFESTS += [
-    'browser-window.ini',
     'browser.ini',
 ]