зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1375710 - Remove CPOWs from browser_tabfocus.js. r=Gijs
This test was already trying to prevent itself from touching CPOWs. The trick is to stop the event from ever propagating all the way to the shim. MozReview-Commit-ID: 4oVt7x3J6eI --HG-- extra : rebase_source : 1d16c6270e24712bf4c4861c0deb5a587342918a
This commit is contained in:
Родитель
08dd9ccf3b
Коммит
1decae6fee
|
@ -71,6 +71,9 @@ function focusInChild() {
|
|||
}
|
||||
|
||||
function eventListener(event) {
|
||||
// Stop the shim code from seeing this event process.
|
||||
event.stopImmediatePropagation();
|
||||
|
||||
var id;
|
||||
if (event.target instanceof Components.interfaces.nsIDOMWindow)
|
||||
id = getWindowDocId(event.originalTarget) + "-window";
|
||||
|
@ -136,7 +139,7 @@ add_task(async function() {
|
|||
await promiseTabLoadEvent(tab1, "data:text/html," + escape(testPage1));
|
||||
await promiseTabLoadEvent(tab2, "data:text/html," + escape(testPage2));
|
||||
|
||||
var childFocusScript = "data:,(" + focusInChild.toString() + ")();";
|
||||
var childFocusScript = "data:,(" + escape(focusInChild.toString()) + ")();";
|
||||
browser1.messageManager.loadFrameScript(childFocusScript, true);
|
||||
browser2.messageManager.loadFrameScript(childFocusScript, true);
|
||||
|
||||
|
@ -380,10 +383,6 @@ function _browser_tabfocus_test_eventOccured(event) {
|
|||
|
||||
var id;
|
||||
|
||||
// Some focus events from the child bubble up? Ignore them.
|
||||
if (Cu.isCrossProcessWrapper(event.originalTarget))
|
||||
return;
|
||||
|
||||
if (event.target instanceof Window)
|
||||
id = getWindowDocId(event.originalTarget) + "-window";
|
||||
else if (event.target instanceof Document)
|
||||
|
|
Загрузка…
Ссылка в новой задаче