Bug 1302707 - Replace uses of Marionette.timeouts with set_page_load_timeout in tests; r?automatedtester draft
authorAndreas Tolfsen <ato@mozilla.com>
Wed, 14 Sep 2016 18:15:16 +0100
changeset 418525 367672727922f04a343ef1ab4377ded63e417f54
parent 418524 dbe786cde946292eb76fc767f5736eceb3123ae9
child 418526 94a13a4b82a73c73a48687d2be2553018c08531a
push id30699
push userbmo:ato@mozilla.com
push dateWed, 28 Sep 2016 16:44:24 +0000
reviewersautomatedtester
bugs1302707
milestone52.0a1
Bug 1302707 - Replace uses of Marionette.timeouts with set_page_load_timeout in tests; r?automatedtester MozReview-Commit-ID: CrG4XdGjw5E
testing/marionette/harness/marionette/tests/unit/test_navigation.py
toolkit/components/microformats/test/marionette/microformats_tester.py
--- a/testing/marionette/harness/marionette/tests/unit/test_navigation.py
+++ b/testing/marionette/harness/marionette/tests/unit/test_navigation.py
@@ -121,17 +121,17 @@ class TestNavigate(MarionetteTestCase):
         self.marionette.navigate(self.test_doc)
         state = self.marionette.execute_script("return window.document.readyState")
         self.assertEqual("complete", state)
         self.assertTrue(self.marionette.find_element(By.ID, "mozLink"))
 
     @unittest.skip("Bug 1302707 - No timeout exception raised.")
     def test_should_throw_a_timeoutexception_when_loading_page(self):
         try:
-            self.marionette.timeouts("page load", 0)
+            self.marionette.set_page_load_timeout(0)
             self.marionette.navigate(self.test_doc)
             self.assertTrue(self.marionette.find_element(By.ID, "mozLink"))
             self.fail("Should have thrown a MarionetteException")
         except TimeoutException as e:
             self.assertTrue("Error loading page, timed out" in str(e))
         except Exception as e:
             import traceback
             print traceback.format_exc()
--- a/toolkit/components/microformats/test/marionette/microformats_tester.py
+++ b/toolkit/components/microformats/test/marionette/microformats_tester.py
@@ -70,17 +70,17 @@ class BaseTestFrontendUnits(MarionetteTe
         self.marionette.enforce_gecko_prefs({
             "browser.tabs.remote.autostart": True
         })
 
         # This extends the timeout for find_element. We need this as the tests
         # take an amount of time to run after loading, which we have to wait for.
         self.marionette.set_search_timeout(120000)
 
-        self.marionette.timeouts("page load", 120000)
+        self.marionette.set_page_load_timeout(120000)
 
     # srcdir_path should be the directory relative to this file.
     def set_server_prefix(self, srcdir_path):
         # We may be run from a different path than topsrcdir, e.g. in the case
         # of packaged tests. If so, then we have to work out the right directory
         # for the local server.
 
         # First find the top of the working directory.