Bug 1302707 - Replace uses of Marionette.timeouts with set_page_load_timeout in tests; r?automatedtester
MozReview-Commit-ID: CrG4XdGjw5E
--- 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.