Bug 1226311, part 2 - Remove SpecialPowers.isMainProcess usage from various IndexedDB tests. r=janv

isMainProcess() is used in a few places to disable tests when run in a
content process. However, these tests are either never run in e10s or
pass when run with e10s, so remove all of the testing code. Some of
this was to work around issues with test_ipc.html which does not seem
to exist any more.

This patch also removes some code for disabling a test on Windows 2003.
This commit is contained in:
Andrew McCreight 2015-11-25 08:09:32 -08:00
Родитель f417b30660
Коммит 738b476cb2
4 изменённых файлов: 8 добавлений и 47 удалений

Просмотреть файл

@ -153,16 +153,9 @@ function startTest() {
} }
} }
// test_ipc.html executes all the tests in this directory in content process. // TODO: remove unsetting network.disable.ipc.security as part of bug 820712
// It will fail on this one for the moment. SpecialPowers.pushPrefEnv({
if (!SpecialPowers.isMainProcess()) { "set": [
todo(false, "We should make this work on content process"); ["network.disable.ipc.security", true],
SimpleTest.finish(); ]
} else { }, startTest);
// TODO: remove unsetting network.disable.ipc.security as part of bug 820712
SpecialPowers.pushPrefEnv({
"set": [
["network.disable.ipc.security", true],
]
}, startTest);
}

Просмотреть файл

@ -8,25 +8,6 @@
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="text/javascript">
function _runTest() {
// Work around Win2k3 debug tinderboxes that may be too slow to complete this test. (Bug 614474)
if (navigator.oscpu == "Windows NT 5.2") {
todo(false, "Test disabled on (too slow debug) Windows 2003 (tinderboxes)");
finishTest();
return;
}
if (!SpecialPowers.isMainProcess()) {
todo(false, "Test disabled in child processes, for now");
finishTest();
return;
}
runTest();
}
</script>
<script type="text/javascript;version=1.7"> <script type="text/javascript;version=1.7">
var gOrigMaxTotalViewers = undefined; var gOrigMaxTotalViewers = undefined;
function setCachePref(enabled) { function setCachePref(enabled) {
@ -79,7 +60,7 @@
</head> </head>
<body onload="_runTest();"> <body onload="runTest();">
<iframe id="iframe"></iframe> <iframe id="iframe"></iframe>
</body> </body>

Просмотреть файл

@ -15,13 +15,6 @@
<a id="a" href="leaving_page_iframe.html"></a> <a id="a" href="leaving_page_iframe.html"></a>
<script type="text/javascript;version=1.7"> <script type="text/javascript;version=1.7">
if (!SpecialPowers.isMainProcess()) {
window.runTest = function() {
todo(false, "Figure out this test for child processes!");
finishTest();
}
}
onmessage = function(e) { onmessage = function(e) {
ok(false, "gotmessage: " + e.data); ok(false, "gotmessage: " + e.data);
} }
@ -37,7 +30,7 @@
yield undefined; yield undefined;
is(iframe.contentWindow.location.href, "about:blank", is(iframe.contentWindow.location.href, "about:blank",
"should nagivate to about:blank"); "should nagivate to about:blank");
let request = indexedDB.open(location, 1); let request = indexedDB.open(location, 1);
request.onsuccess = grabEventAndContinueHandler; request.onsuccess = grabEventAndContinueHandler;
let event = yield undefined; let event = yield undefined;

Просмотреть файл

@ -110,12 +110,6 @@ function testSteps()
function start() function start()
{ {
if (!SpecialPowers.isMainProcess()) {
todo(false, "Test disabled in child processes, for now");
SimpleTest.finish();
return;
}
SpecialPowers.addPermission("browser", true, document); SpecialPowers.addPermission("browser", true, document);
SpecialPowers.addPermission("browser", true, { manifestURL: manifestURL }); SpecialPowers.addPermission("browser", true, { manifestURL: manifestURL });
SpecialPowers.addPermission("embed-apps", true, document); SpecialPowers.addPermission("embed-apps", true, document);