patch to intermittent issue (
Bug 1334996); r?whimboo
MozReview-Commit-ID: 2okXTKuf8b0
--- a/testing/firefox-ui/tests/functional/security/test_safe_browsing_warning_pages.py
+++ b/testing/firefox-ui/tests/functional/security/test_safe_browsing_warning_pages.py
@@ -86,24 +86,22 @@ class TestSafeBrowsingWarningPages(Puppe
# Wait for the button to become stale, whereby a longer timeout is needed
# here to not fail in case of slow connections.
Wait(self.marionette, timeout=self.marionette.timeout.page_load).until(
expected.element_stale(button))
# Wait for page load to be completed, so we can verify the URL even if a redirect happens.
# TODO: Bug 1140470: use replacement for mozmill's waitforPageLoad
+
Wait(self.marionette, timeout=self.marionette.timeout.page_load).until(
- lambda mn: mn.execute_script('return document.readyState == "DOMContentLoaded" ||'
- ' document.readyState == "complete";')
+ lambda mn: True if mn.get_url() == self.browser.get_final_url(url) else False ,
+ message= "The current url did not match with the final url we expected"
)
- # check that our current url matches the final url we expect
- self.assertEquals(self.marionette.get_url(), self.browser.get_final_url(url))
-
def check_ignore_warning_button(self, unsafe_page):
button = self.marionette.find_element(By.ID, 'ignoreWarningButton')
button.click()
Wait(self.marionette, timeout=self.marionette.timeout.page_load).until(
expected.element_present(By.ID, 'main-feature'))
self.assertEquals(self.marionette.get_url(), self.browser.get_final_url(unsafe_page))