Bug 1407949 - Remove workaround for short content processes from bug 1290186. draft
authorHenrik Skupin <mail@hskupin.info>
Tue, 05 Dec 2017 09:11:31 +0100
changeset 707457 20cd9f69b2f2ca3ac173219149b2c81648b897e7
parent 706692 709f355a7a8c4ae426d1824841a71ffdb5ce0137
child 742937 e1ff96b33d7cecdfe5ef28aa538bf14600a367e1
push id92112
push userbmo:hskupin@gmail.com
push dateTue, 05 Dec 2017 08:12:36 +0000
bugs1407949, 1290186
milestone59.0a1
Bug 1407949 - Remove workaround for short content processes from bug 1290186. MozReview-Commit-ID: 1spM8GFuCvS
testing/firefox-ui/tests/puppeteer/test_windows.py
--- a/testing/firefox-ui/tests/puppeteer/test_windows.py
+++ b/testing/firefox-ui/tests/puppeteer/test_windows.py
@@ -6,44 +6,17 @@ import firefox_puppeteer.errors as error
 
 from firefox_puppeteer import PuppeteerMixin
 from firefox_puppeteer.ui.windows import BaseWindow
 from marionette_driver import By, Wait
 from marionette_driver.errors import NoSuchWindowException
 from marionette_harness import MarionetteTestCase
 
 
-class BaseWindowTestCase(PuppeteerMixin, MarionetteTestCase):
-
-    def setUp(self):
-        """
-        These tests open and close windows pretty rapidly, which
-        (since bug 1261842) can cause content processes to be
-        spawned and discarded in large numbers. By default, Firefox
-        has a 5 second timeout for shutting down content processes,
-        but we can get into cases where the content process just
-        doesn't have enough time to get itself all sorted before
-        the timeout gets hit, which results in the parent killing
-        the content process manually, which generates a crash report,
-        which causes these tests to orange. We side-step this by
-        setting dom.ipc.tabs.shutdownTimeoutSecs to 0, which disables
-        the shutdown timer.
-        """
-        super(BaseWindowTestCase, self).setUp()
-
-        self.marionette.set_pref('dom.ipc.tabs.shutdownTimeoutSecs', 0)
-
-    def tearDown(self):
-        try:
-            self.marionette.clear_pref('dom.ipc.tabs.shutdownTimeoutSecs')
-        finally:
-            super(BaseWindowTestCase, self).tearDown()
-
-
-class TestWindows(BaseWindowTestCase):
+class TestWindows(PuppeteerMixin, MarionetteTestCase):
 
     def tearDown(self):
         try:
             self.puppeteer.windows.close_all([self.browser])
             self.browser.switch_to()
         finally:
             super(TestWindows, self).tearDown()
 
@@ -98,17 +71,17 @@ class TestWindows(BaseWindowTestCase):
                               'chrome,centerscreen,resizable=no');
                 """)
 
         win = self.browser.open_window(callback=open_by_js, expected_window_class=BaseWindow)
         win.close()
         self.browser.switch_to()
 
 
-class TestBaseWindow(BaseWindowTestCase):
+class TestBaseWindow(PuppeteerMixin, MarionetteTestCase):
 
     def tearDown(self):
         try:
             self.puppeteer.windows.close_all([self.browser])
             self.browser.switch_to()
         finally:
             super(TestBaseWindow, self).tearDown()
 
@@ -208,17 +181,17 @@ class TestBaseWindow(BaseWindowTestCase)
 
         # Close win2, and check that it keeps active but looses focus
         win2.switch_to()
         win2.close()
 
         win1.switch_to()
 
 
-class TestBrowserWindow(BaseWindowTestCase):
+class TestBrowserWindow(PuppeteerMixin, MarionetteTestCase):
 
     def tearDown(self):
         try:
             self.puppeteer.windows.close_all([self.browser])
             self.browser.switch_to()
         finally:
             super(TestBrowserWindow, self).tearDown()