Bug 1364245 - Extend delay for slow loading resource testcase to prevent intermittent.
For debug builds a delay of 1s is too short. It means that a navigation
command will return when the readyState reaches interactive for an eager
page load strategy. Also due to the slowness of the browser, the getUrl
command which gets run before the readyState check takes too long. Doing
the latter check first fixes it.
MozReview-Commit-ID: D2je04Euwf0
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py
@@ -626,18 +626,18 @@ class TestPageLoadStrategy(BaseNavigatio
# With a strategy of "none" there should be no wait for the page load, and the
# current load state is unknown. So only test that the command executes successfully.
self.marionette.navigate(self.test_page_slow_resource)
def test_eager(self):
self.marionette.start_session({"desiredCapabilities": {"pageLoadStrategy": "eager"}})
self.marionette.navigate(self.test_page_slow_resource)
+ self.assertEqual("interactive", self.ready_state)
self.assertEqual(self.test_page_slow_resource, self.marionette.get_url())
- self.assertEqual("interactive", self.ready_state)
self.marionette.find_element(By.ID, "slow")
def test_normal(self):
self.marionette.start_session({"desiredCapabilities": {"pageLoadStrategy": "normal"}})
self.marionette.navigate(self.test_page_slow_resource)
self.assertEqual(self.test_page_slow_resource, self.marionette.get_url())
self.assertEqual("complete", self.ready_state)
--- a/testing/marionette/harness/marionette_harness/www/slow_resource.html
+++ b/testing/marionette/harness/marionette_harness/www/slow_resource.html
@@ -3,11 +3,11 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE html>
<html>
<head>
<title>Slow loading resource</title>
</head>
<body>
- <img src="/slow?delay=1" id="slow" />
+ <img src="/slow?delay=4" id="slow" />
</body>
</html>
\ No newline at end of file