Bug 1824224 - [marionette] Do not send open event for prompts which do not belong to current browser on Android. r=webdriver-reviewers,whimboo

Differential Revision: https://phabricator.services.mozilla.com/D186235
This commit is contained in:
Alexandra Borovova 2023-08-18 17:49:10 +00:00
parent 4e4272ae52
commit b09db560e8
2 changed files with 12 additions and 4 deletions

View File

@ -232,6 +232,12 @@ modal.DialogObserver = class {
const contentBrowser = lazy.TabManager.getBrowserForTab(tab);
const window = lazy.TabManager.getWindowForTab(tab);
// Do not send the event if the curBrowser is specified,
// and it's different from prompt browser.
if (curBrowser && contentBrowser !== curBrowser.contentBrowser) {
continue;
}
this.callbacks.forEach(callback =>
callback(
modal.ACTION_OPENED,

View File

@ -1,16 +1,18 @@
[execute_async.py]
bug: [1789355, 1806999]
[test_no_abort_by_user_prompt_in_other_tab[alert\]]
bug: 1806999
expected:
if os == "android" or tsan: [PASS, FAIL]
if tsan: [PASS, FAIL]
PASS
[test_no_abort_by_user_prompt_in_other_tab[confirm\]]
bug: 1806999
expected:
if os == "android" or tsan: [PASS, FAIL]
if tsan: [PASS, FAIL]
PASS
[test_no_abort_by_user_prompt_in_other_tab[prompt\]]
bug: 1806999
expected:
if os == "android" or tsan: [PASS, FAIL]
if tsan: [PASS, FAIL]
PASS