зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1667377 - [marionette] Always call navigation callback in waitForNavigationCompleted. r=marionette-reviewers,maja_zf
Even in the case of no load event expected, or the page load strategy as set to None the callback that triggers the navigation always has to be called. Depends on D91443 Differential Revision: https://phabricator.services.mozilla.com/D91444
This commit is contained in:
Родитель
37dcfb1c7c
Коммит
d7cd6f04af
|
@ -796,9 +796,12 @@ class TestPageLoadStrategy(BaseNavigationTestCase):
|
|||
self.marionette.delete_session()
|
||||
self.marionette.start_session({"pageLoadStrategy": "none"})
|
||||
|
||||
# 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)
|
||||
Wait(self.marionette, timeout=self.marionette.timeout.page_load).until(
|
||||
lambda _: self.marionette.get_url() == self.test_page_slow_resource,
|
||||
message="Target page has not been loaded"
|
||||
)
|
||||
self.marionette.find_element(By.ID, "slow")
|
||||
|
||||
def test_eager(self):
|
||||
self.marionette.delete_session()
|
||||
|
|
|
@ -192,6 +192,7 @@ navigate.waitForNavigationCompleted = async function waitForNavigationCompleted(
|
|||
|
||||
// Return immediately if no load event is expected
|
||||
if (!loadEventExpected || pageLoadStrategy === PageLoadStrategy.None) {
|
||||
await callback();
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче