Bug 1333736 - Disable usage of new tab page by default. r=maja_zf
☠☠ backed out by 831c20c3086b ☠ ☠
authorHenrik Skupin <mail@hskupin.info>
Wed, 25 Jan 2017 14:50:24 +0100
changeset 331385 a9afb304dbb69dfab72128cf355f627f9af25828
parent 331384 a15be64c84409012527a846e13f5ff36b9478b59
child 331386 54a7d6b486195d982aa5f4d6f1cff7ac2dd3f75c
push id36578
push userhskupin@mozilla.com
push dateFri, 27 Jan 2017 17:00:33 +0000
treeherderautoland@a9afb304dbb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf
bugs1333736
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1333736 - Disable usage of new tab page by default. r=maja_zf Now that Marionette can load about:blank multiple times right after each other there is no need to prevent using it when turning of the new tab page. test_about_blank_for_new_docshell can also be updated by using a new tab for the test. This also gives us a new docshell and can also be run for Fennec. MozReview-Commit-ID: GWxtsH3nQt
testing/marionette/client/marionette_driver/geckoinstance.py
testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py
--- a/testing/marionette/client/marionette_driver/geckoinstance.py
+++ b/testing/marionette/client/marionette_driver/geckoinstance.py
@@ -381,20 +381,18 @@ class DesktopInstance(GeckoInstance):
 
         # Indicate that the download panel has been shown once so that whichever
         # download test runs first doesn"t show the popup inconsistently
         "browser.download.panel.shown": True,
 
         # Do not show the EULA notification which can interfer with tests
         "browser.EULA.override": True,
 
-        # Bug 1145668, 1312674
-        # Turn off once Marionette can correctly handle error pages, and doesn't
-        # hang when about:blank gets loaded twice
-        "browser.newtabpage.enabled": True,
+        # Turn off about:newtab and make use of about:blank instead for new opened tabs
+        "browser.newtabpage.enabled": False,
         # Assume the about:newtab page"s intro panels have been shown to not depend on
         # which test runs first and happens to open about:newtab
         "browser.newtabpage.introShown": True,
 
         # Background thumbnails in particular cause grief, and disabling thumbnails
         # in general can"t hurt - we re-enable them when tests need them
         "browser.pagethumbnails.capturing_disabled": True,
 
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py
@@ -153,23 +153,29 @@ class TestNavigate(WindowManagerMixin, M
     def test_fragment(self):
         doc = inline("<p id=foo>")
         self.marionette.navigate(doc)
         self.marionette.execute_script("window.visited = true", sandbox=None)
         self.marionette.navigate("%s#foo" % doc)
         self.assertTrue(self.marionette.execute_script(
             "return window.visited", sandbox=None))
 
-    @skip_if_mobile("Fennec doesn't support other chrome windows")
+    @skip_if_mobile("Bug 1334095 - Timeout: No new tab has been opened")
     def test_about_blank_for_new_docshell(self):
         """ Bug 1312674 - Hang when loading about:blank for a new docshell."""
-        # Open a window to get a new docshell created for the first tab
-        with self.marionette.using_context("chrome"):
-            tab = self.open_tab(lambda: self.marionette.execute_script(" window.open() "))
-            self.marionette.switch_to_window(tab)
+        def open_with_link():
+            self.marionette.navigate(self.marionette.absolute_url("windowHandles.html"))
+
+            link = self.marionette.find_element(By.ID, "new-tab")
+            link.click()
+
+        # Open a new tab to get a new docshell created
+        new_tab = self.open_tab(trigger=open_with_link)
+        self.marionette.switch_to_window(new_tab)
+        self.assertEqual(self.marionette.get_url(), "about:blank")
 
         self.marionette.navigate('about:blank')
         self.marionette.close()
         self.marionette.switch_to_window(self.start_window)
 
     def test_error_on_tls_navigation(self):
         self.assertRaises(errors.InsecureCertificateException,
                           self.marionette.navigate, self.fixtures.where_is("/test.html", on="https"))