Bug 1334996 - Click on Safebrowsing report button has to wait for the final URL.
MozReview-Commit-ID: In6G5b9hdLg
--- 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
@@ -88,18 +88,18 @@ class TestSafeBrowsingWarningPages(Puppe
# 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: 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"
+ lambda mn: mn.get_url() == self.browser.get_final_url(url) ,
+ message= "The Expected URL '{}' has not been loaded".format(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'))