mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 766546 - Ignore the iframe's load event and continue when the whole page has loaded. r=avih
This commit is contained in:
parent
fc50664f28
commit
aa33cd1986
@ -123,6 +123,7 @@ MOCHITEST_BROWSER_FILES = \
|
||||
browser_bug556061.js \
|
||||
browser_bug559991.js \
|
||||
browser_bug561623.js \
|
||||
browser_bug561636.js \
|
||||
browser_bug562649.js \
|
||||
browser_bug563588.js \
|
||||
browser_bug565575.js \
|
||||
@ -352,13 +353,6 @@ MOCHITEST_BROWSER_FILES += \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
# Bug 766546.
|
||||
MOCHITEST_BROWSER_FILES += \
|
||||
browser_bug561636.js \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef MOZ_DATA_REPORTING
|
||||
MOCHITEST_BROWSER_FILES += \
|
||||
browser_datareporting_notification.js \
|
||||
|
@ -374,13 +374,15 @@ function()
|
||||
Services.obs.addObserver(gObserver, "invalidformsubmit", false);
|
||||
|
||||
tab.linkedBrowser.addEventListener("load", function(e) {
|
||||
let browser = e.currentTarget;
|
||||
browser.removeEventListener("load", arguments.callee, true);
|
||||
// Ignore load events from the iframe.
|
||||
if (tab.linkedBrowser.contentDocument == e.target) {
|
||||
let browser = e.currentTarget;
|
||||
browser.removeEventListener("load", arguments.callee, true);
|
||||
|
||||
isnot(gBrowser.selectedTab.linkedBrowser, browser,
|
||||
"This tab should have been loaded in background");
|
||||
Services.console.logStringMessage("About to click #s on URI: " + browser.contentDocument.location.href);
|
||||
browser.contentDocument.getElementById('s').click();
|
||||
isnot(gBrowser.selectedTab.linkedBrowser, browser,
|
||||
"This tab should have been loaded in background");
|
||||
browser.contentDocument.getElementById('s').click();
|
||||
}
|
||||
}, true);
|
||||
|
||||
tab.linkedBrowser.loadURI(uri);
|
||||
|
Loading…
Reference in New Issue
Block a user