mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Bug 908213 - Fix CPOWs test failure and make it more robust. r=dvander
This commit is contained in:
parent
49d23d9e16
commit
245533bc39
@ -5,7 +5,10 @@ content.document.title = "Hello, Kitty";
|
||||
(function start() {
|
||||
sync_test();
|
||||
async_test();
|
||||
sendAsyncMessage("cpows:done", {});
|
||||
// The sync-ness of this call is important, because otherwise
|
||||
// we tear down the child's document while we are
|
||||
// still in the async test in the parent.
|
||||
sendSyncMessage("cpows:done", {});
|
||||
}
|
||||
)();
|
||||
|
||||
|
@ -17,6 +17,11 @@
|
||||
return opener.wrappedJSObject.ok(condition, message);
|
||||
}
|
||||
|
||||
// Make sure that an error in this file actually causes the test to fail.
|
||||
window.onerror = function (msg, url, line) {
|
||||
ok(false, "Error while executing: \n" + msg + "\n" + url + ":" + line);
|
||||
};
|
||||
|
||||
function testCpowMessage(message) {
|
||||
ok(message.json.check == "ok", "correct json");
|
||||
|
||||
|
@ -21,7 +21,10 @@
|
||||
}
|
||||
|
||||
addLoadEvent(function() {
|
||||
window.open("cpows_parent.xul", "", "chrome");
|
||||
// We don't want to set browser.tabs.remote to true, but still have CPOWs enabled.
|
||||
SpecialPowers.pushPrefEnv({"set": [["dom.ipc.cpows.force-enabled", true]]}, function() {
|
||||
window.open("cpows_parent.xul", "", "chrome");
|
||||
});
|
||||
});
|
||||
]]></script>
|
||||
</window>
|
||||
|
@ -2339,8 +2339,8 @@ TabChild::InitRenderingState()
|
||||
|
||||
// This state can't really change during the lifetime of the child.
|
||||
sCpowsEnabled = Preferences::GetBool("browser.tabs.remote", false);
|
||||
if (Preferences::GetBool("dom.ipc.cpows.force-disabled", false))
|
||||
sCpowsEnabled = false;
|
||||
if (Preferences::GetBool("dom.ipc.cpows.force-enabled", false))
|
||||
sCpowsEnabled = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user