зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1707823 - [devtools] Make navigateTo more secure. r=ochameau.
In the `BrowserTestUtils.browserLoaded` call we use in `navigateTo`, we weren't checking for a specific uri to be loaded, which means the Promise could resolve on *any* page being loaded. This patch makes it more secure by waiting the load event for the uri we navigated to. Differential Revision: https://phabricator.services.mozilla.com/D113479
This commit is contained in:
Родитель
4589016d4c
Коммит
13980e9a4f
|
@ -491,8 +491,10 @@ async function navigateTo(uri, { isErrorPage = false } = {}) {
|
|||
const currentBrowsingContextID = browser.browsingContext.id;
|
||||
const onBrowserLoaded = BrowserTestUtils.browserLoaded(
|
||||
browser,
|
||||
// includeSubFrames
|
||||
false,
|
||||
null,
|
||||
// resolve on this specific page to load (if null, it would be any page load)
|
||||
uri,
|
||||
isErrorPage
|
||||
);
|
||||
BrowserTestUtils.loadURI(browser, uri);
|
||||
|
|
Загрузка…
Ссылка в новой задаче