Issue fix
Bug 1334996
MozReview-Commit-ID: CnpkcjaBOhb
--- 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
@@ -96,26 +96,28 @@ class TestSafeBrowsingWarningPages(Puppe
# ' document.readyState == "complete";')
#)
if not self.wait_url(self.marionette.get_url(), self.browser.get_final_url(url)):
exit()
# check that our current url matches the final url we expect
self.assertEquals(self.marionette.get_url(), self.browser.get_final_url(url))
+ def wait_url(self, actual_url, checked_url):
+ ## will look for target URL from current time to 500 secs and poll every 5 secs
+ mustend=time.time() + 500
+ while time.time() < mustend:
+ if actual_url == checked_url : return True
+ time.sleep(5)
+ return
+
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))
# Clean up by removing safe browsing permission for unsafe page
self.puppeteer.utils.permissions.remove('https://www.itisatrap.org', 'safe-browsing')
- def wait_url(self, actual_url, checked_url):
- ## will look for target URL from current time to 500 secs and poll every 5 secs
- mustend=time.time() + 500
- while time.time() < mustend:
- if actual_url == checked_url : return True
- time.sleep(5)
- return
\ No newline at end of file
+
\ No newline at end of file