зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 4 changesets (bug 981796) for android failures in test_bug414291.html a=backout
Backed out changeset fe6569eae4ef (bug 981796) Backed out changeset eca1651af3d3 (bug 981796) Backed out changeset 5a1e684a1494 (bug 981796) Backed out changeset 7f91ff196c93 (bug 981796) MozReview-Commit-ID: COSf2kvo6c7
This commit is contained in:
Родитель
8c47606640
Коммит
3923267017
|
@ -10119,12 +10119,8 @@ nsGlobalWindow::ShowModalDialog(JSContext* aCx, const nsAString& aUrl,
|
||||||
|
|
||||||
JS::Rooted<JS::Value> result(aCx);
|
JS::Rooted<JS::Value> result(aCx);
|
||||||
if (retVal) {
|
if (retVal) {
|
||||||
JS::Rooted<JSObject*> global(aCx, JS::CurrentGlobalOrNull(aCx));
|
|
||||||
if (!global) {
|
|
||||||
global = FastGetGlobalJSObject();
|
|
||||||
}
|
|
||||||
aError = nsContentUtils::XPConnect()->VariantToJS(aCx,
|
aError = nsContentUtils::XPConnect()->VariantToJS(aCx,
|
||||||
global,
|
FastGetGlobalJSObject(),
|
||||||
retVal, aRetval);
|
retVal, aRetval);
|
||||||
} else {
|
} else {
|
||||||
aRetval.setNull();
|
aRetval.setNull();
|
||||||
|
|
|
@ -16,16 +16,8 @@
|
||||||
*/
|
*/
|
||||||
SimpleTest.waitForExplicitFinish();
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
|
||||||
async function openModal() {
|
function openModal() {
|
||||||
await SpecialPowers.pushPrefEnv({ set: [[
|
showModalDialog("javascript:opener.winRef = window; \
|
||||||
"dom.disable_window_showModalDialog", false ]] });
|
|
||||||
|
|
||||||
let iframe = document.createElement("iframe");
|
|
||||||
document.body.appendChild(iframe);
|
|
||||||
await new Promise(resolve => {
|
|
||||||
iframe.addEventListener("load", resolve);
|
|
||||||
});
|
|
||||||
iframe.contentWindow.showModalDialog("javascript:opener.winRef = window; \
|
|
||||||
window.opener.setTimeout(\'winRef.dialogArguments;\', 0);\
|
window.opener.setTimeout(\'winRef.dialogArguments;\', 0);\
|
||||||
window.close();");
|
window.close();");
|
||||||
|
|
||||||
|
|
|
@ -487,14 +487,7 @@ function testSyncXHR2() {
|
||||||
then(testModalDialog);
|
then(testModalDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function testModalDialog() {
|
function testModalDialog() {
|
||||||
await SpecialPowers.pushPrefEnv({ set: [[ "dom.disable_window_showModalDialog", false ]] });
|
|
||||||
let iframe = document.createElement("iframe");
|
|
||||||
document.body.appendChild(iframe);
|
|
||||||
await new Promise(resolve => {
|
|
||||||
iframe.addEventListener("load", resolve);
|
|
||||||
});
|
|
||||||
window.showModalDialog = iframe.contentWindow.showModalDialog;
|
|
||||||
var didHandleCallback = false;
|
var didHandleCallback = false;
|
||||||
div.innerHTML = "<span>1</span><span>2</span>";
|
div.innerHTML = "<span>1</span><span>2</span>";
|
||||||
m = new M(function(records, observer) {
|
m = new M(function(records, observer) {
|
||||||
|
|
|
@ -14,23 +14,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=391777
|
||||||
<script class="testbody" type="text/javascript">
|
<script class="testbody" type="text/javascript">
|
||||||
|
|
||||||
/** Test for Bug 391777 **/
|
/** Test for Bug 391777 **/
|
||||||
SimpleTest.waitForExplicitFinish();
|
var arg = {};
|
||||||
|
arg.testVal = "foo";
|
||||||
SpecialPowers.pushPrefEnv({ set: [[ "dom.disable_window_showModalDialog", false ]] }, doTest);
|
var result = window.showModalDialog("javascript:window.returnValue = window.dialogArguments.testVal; window.close(); 'This window should close on its own.';", arg);
|
||||||
async function doTest() {
|
ok(true, "We should get here without user interaction");
|
||||||
let iframe = document.createElement("iframe");
|
is(result, "foo", "Unexpected result from showModalDialog");
|
||||||
document.body.appendChild(iframe);
|
|
||||||
await new Promise(resolve => {
|
|
||||||
iframe.addEventListener("load", resolve);
|
|
||||||
});
|
|
||||||
window.showModalDialog = iframe.contentWindow.showModalDialog;
|
|
||||||
var arg = {};
|
|
||||||
arg.testVal = "foo";
|
|
||||||
var result = window.showModalDialog("javascript:window.returnValue = window.dialogArguments.testVal; window.close(); 'This window should close on its own.';", arg);
|
|
||||||
ok(true, "We should get here without user interaction");
|
|
||||||
is(result, "foo", "Unexpected result from showModalDialog");
|
|
||||||
SimpleTest.finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -109,9 +109,7 @@ function doTest() {
|
||||||
// file_iframe_j_if3.html has an ok() function that calls window.parent.ok_wrapper.
|
// file_iframe_j_if3.html has an ok() function that calls window.parent.ok_wrapper.
|
||||||
}
|
}
|
||||||
|
|
||||||
let loaded = new Promise(resolve => { addLoadEvent(resolve) });
|
addLoadEvent(doTest);
|
||||||
let prefSet = SpecialPowers.pushPrefEnv({ set: [[ "dom.disable_window_showModalDialog", false ]] });
|
|
||||||
Promise.all([ loaded, prefSet ]).then(doTest);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -59,7 +59,7 @@ skip-if = toolkit == 'android'
|
||||||
[test_bug265203.html]
|
[test_bug265203.html]
|
||||||
[test_bug291377.html]
|
[test_bug291377.html]
|
||||||
[test_bug291653.html]
|
[test_bug291653.html]
|
||||||
skip-if = e10s || toolkit == 'android' #TIMED_OUT
|
skip-if = toolkit == 'android' #TIMED_OUT
|
||||||
[test_bug304459.html]
|
[test_bug304459.html]
|
||||||
[test_bug308856.html]
|
[test_bug308856.html]
|
||||||
[test_bug327891.html]
|
[test_bug327891.html]
|
||||||
|
@ -82,7 +82,7 @@ skip-if = toolkit == 'android' #TIMED_OUT
|
||||||
[test_bug400204.html]
|
[test_bug400204.html]
|
||||||
[test_bug404748.html]
|
[test_bug404748.html]
|
||||||
[test_bug406375.html]
|
[test_bug406375.html]
|
||||||
skip-if = e10s || toolkit == 'android'
|
skip-if = toolkit == 'android'
|
||||||
[test_bug414291.html]
|
[test_bug414291.html]
|
||||||
tags = openwindow
|
tags = openwindow
|
||||||
[test_bug427744.html]
|
[test_bug427744.html]
|
||||||
|
@ -90,20 +90,20 @@ skip-if = toolkit == 'android'
|
||||||
[test_bug42976.html]
|
[test_bug42976.html]
|
||||||
[test_bug430276.html]
|
[test_bug430276.html]
|
||||||
[test_bug437361.html]
|
[test_bug437361.html]
|
||||||
skip-if = e10s || toolkit == 'android'
|
skip-if = toolkit == 'android'
|
||||||
[test_bug440572.html]
|
[test_bug440572.html]
|
||||||
[test_bug456151.html]
|
[test_bug456151.html]
|
||||||
[test_bug458091.html]
|
[test_bug458091.html]
|
||||||
[test_bug459848.html]
|
[test_bug459848.html]
|
||||||
[test_bug465263.html]
|
[test_bug465263.html]
|
||||||
[test_bug479143.html]
|
[test_bug479143.html]
|
||||||
skip-if = e10s || toolkit == 'android'
|
skip-if = toolkit == 'android'
|
||||||
[test_bug484775.html]
|
[test_bug484775.html]
|
||||||
[test_bug492925.html]
|
[test_bug492925.html]
|
||||||
[test_bug49312.html]
|
[test_bug49312.html]
|
||||||
[test_bug495219.html]
|
[test_bug495219.html]
|
||||||
[test_bug504862.html]
|
[test_bug504862.html]
|
||||||
skip-if = e10s || toolkit == 'android' #RANDOM
|
skip-if = toolkit == 'android' #RANDOM
|
||||||
[test_bug529328.html]
|
[test_bug529328.html]
|
||||||
[test_bug531176.html]
|
[test_bug531176.html]
|
||||||
[test_bug531542.html]
|
[test_bug531542.html]
|
||||||
|
|
|
@ -25,7 +25,13 @@ var secondListenerDidRun = false;
|
||||||
|
|
||||||
var w;
|
var w;
|
||||||
function start() {
|
function start() {
|
||||||
w = window.open("file_bug291653.html", "foo", "width=300,height=300");
|
if ("showModalDialog" in window) {
|
||||||
|
w = window.open("file_bug291653.html", "foo", "width=300,height=300");
|
||||||
|
} else {
|
||||||
|
// window.showModalDialog doesn't exist in e10s mode, nothing to do in this test.
|
||||||
|
ok(true, "nothing to do in e10s mode");
|
||||||
|
SimpleTest.finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeTest() {
|
function closeTest() {
|
||||||
|
@ -42,7 +48,7 @@ function end() {
|
||||||
setTimeout("closeTest()", 500);
|
setTimeout("closeTest()", 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
SpecialPowers.pushPrefEnv({ set: [[ "dom.disable_window_showModalDialog", false ]] }, start);
|
start();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
@ -22,16 +22,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=406375
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
|
||||||
async function runTest() {
|
function runTest() {
|
||||||
await SpecialPowers.pushPrefEnv({ set: [[ "dom.disable_window_showModalDialog", false ]] });
|
if ("showModalDialog" in window) {
|
||||||
let iframe = document.createElement("iframe");
|
window.showModalDialog("file_bug406375.html");
|
||||||
document.body.appendChild(iframe);
|
}
|
||||||
await new Promise(resolve => {
|
|
||||||
iframe.addEventListener("load", resolve);
|
|
||||||
});
|
|
||||||
window.showModalDialog = iframe.contentWindow.showModalDialog;
|
|
||||||
|
|
||||||
window.showModalDialog("file_bug406375.html");
|
|
||||||
ok(true, "This test should not hang");
|
ok(true, "This test should not hang");
|
||||||
|
|
||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
|
|
|
@ -13,7 +13,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=414291
|
||||||
<script class="testbody" type="text/javascript">
|
<script class="testbody" type="text/javascript">
|
||||||
|
|
||||||
/** Test for Bug 414291 **/
|
/** Test for Bug 414291 **/
|
||||||
SimpleTest.waitForExplicitFinish();
|
|
||||||
|
|
||||||
var result1 = 0;
|
var result1 = 0;
|
||||||
var result2 = 0;
|
var result2 = 0;
|
||||||
|
@ -25,20 +24,9 @@ is(result1, 0, "window should not be opened either as modal or loaded synchronou
|
||||||
window.open("file2_bug414291.html", "w2", "modal=yes");
|
window.open("file2_bug414291.html", "w2", "modal=yes");
|
||||||
is(result2, 0, "window should not be opened either as modal or data loaded synchronously.");
|
is(result2, 0, "window should not be opened either as modal or data loaded synchronously.");
|
||||||
|
|
||||||
SpecialPowers.pushPrefEnv({ set: [[ "dom.disable_window_showModalDialog", false ]] }, runModalTest);
|
if (window.showModalDialog) {
|
||||||
async function runModalTest() {
|
result3 = window.showModalDialog("file3_bug414291.html");
|
||||||
let iframe = document.createElement("iframe");
|
is(result3, 3, "window should be opened as modal.");
|
||||||
document.body.appendChild(iframe);
|
|
||||||
await new Promise(resolve => {
|
|
||||||
iframe.addEventListener("load", resolve);
|
|
||||||
});
|
|
||||||
window.showModalDialog = iframe.contentWindow.showModalDialog;
|
|
||||||
|
|
||||||
if (window.showModalDialog) {
|
|
||||||
result3 = window.showModalDialog("file3_bug414291.html");
|
|
||||||
is(result3, 3, "window should be opened as modal.");
|
|
||||||
}
|
|
||||||
SimpleTest.finish();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -32,41 +32,32 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=437361
|
||||||
}
|
}
|
||||||
|
|
||||||
function test(disableOpen, exceptionExpected, testFn, errorMsg) {
|
function test(disableOpen, exceptionExpected, testFn, errorMsg) {
|
||||||
var oldPrefVal = SpecialPowers.getBoolPref("dom.disable_open_during_load");
|
if ("showModalDialog" in window) {
|
||||||
try {
|
var oldPrefVal = SpecialPowers.getBoolPref("dom.disable_open_during_load");
|
||||||
SpecialPowers.setBoolPref("dom.disable_open_during_load", disableOpen);
|
try {
|
||||||
testFn();
|
SpecialPowers.setBoolPref("dom.disable_open_during_load", disableOpen);
|
||||||
ok(!exceptionExpected, errorMsg);
|
testFn();
|
||||||
} catch (_) {
|
ok(!exceptionExpected, errorMsg);
|
||||||
ok(exceptionExpected, errorMsg);
|
} catch (_) {
|
||||||
}
|
ok(exceptionExpected, errorMsg);
|
||||||
finally {
|
}
|
||||||
SpecialPowers.setBoolPref("dom.disable_open_during_load", oldPrefVal);
|
finally {
|
||||||
|
SpecialPowers.setBoolPref("dom.disable_open_during_load", oldPrefVal);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ok(true, "nothing to do in e10s mode");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
test(true, false, testModalDialogBlockedCleanly,
|
||||||
|
"Blocked showModalDialog caused an exception.");
|
||||||
|
|
||||||
|
test(false, false, testModalDialogAllowed,
|
||||||
|
"showModalDialog was blocked even though dom.disable_open_during_load was false.");
|
||||||
|
|
||||||
SpecialPowers.pushPrefEnv({ set: [[ "dom.disable_window_showModalDialog", false ]] }, doTest);
|
test(false, true, testOtherExceptionsNotTrapped,
|
||||||
async function doTest() {
|
"Incorrectly suppressed insecure showModalDialog exception.");
|
||||||
let iframe = document.createElement("iframe");
|
|
||||||
document.body.appendChild(iframe);
|
|
||||||
await new Promise(resolve => {
|
|
||||||
iframe.addEventListener("load", resolve);
|
|
||||||
});
|
|
||||||
window.showModalDialog = iframe.contentWindow.showModalDialog;
|
|
||||||
|
|
||||||
test(true, false, testModalDialogBlockedCleanly,
|
|
||||||
"Blocked showModalDialog caused an exception.");
|
|
||||||
|
|
||||||
test(false, false, testModalDialogAllowed,
|
|
||||||
"showModalDialog was blocked even though dom.disable_open_during_load was false.");
|
|
||||||
|
|
||||||
test(false, true, testOtherExceptionsNotTrapped,
|
|
||||||
"Incorrectly suppressed insecure showModalDialog exception.");
|
|
||||||
|
|
||||||
SimpleTest.finish();
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -18,32 +18,25 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=479143
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
|
||||||
SpecialPowers.pushPrefEnv({ set: [[ "dom.disable_window_showModalDialog", false ]] }, doTest);
|
setTimeout(function() {
|
||||||
async function doTest() {
|
if ("showModalDialog" in window) {
|
||||||
await SpecialPowers.pushPrefEnv({ set: [[ "dom.disable_window_showModalDialog", false ]] });
|
var interval = setInterval(function() { var i = 0; i++; }, 10);
|
||||||
let iframe = document.createElement("iframe");
|
|
||||||
document.body.appendChild(iframe);
|
|
||||||
await new Promise(resolve => {
|
|
||||||
iframe.addEventListener("load", resolve);
|
|
||||||
});
|
|
||||||
window.showModalDialog = iframe.contentWindow.showModalDialog;
|
|
||||||
|
|
||||||
var interval = setInterval(function() { var i = 0; i++; }, 10);
|
var xhr = new XMLHttpRequest();
|
||||||
|
xhr.open("GET", "test_bug479143.html", false);
|
||||||
|
xhr.send(null);
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
window.showModalDialog("javascript:" +
|
||||||
xhr.open("GET", "test_bug479143.html", false);
|
"setTimeout(function() { window.close(); }, 1000);",
|
||||||
xhr.send(null);
|
null);
|
||||||
|
|
||||||
window.showModalDialog("javascript:" +
|
clearInterval(interval);
|
||||||
"setTimeout(function() { window.close(); }, 1000);",
|
}
|
||||||
null);
|
|
||||||
|
|
||||||
clearInterval(interval);
|
|
||||||
|
|
||||||
ok(true, "did not crash");
|
ok(true, "did not crash");
|
||||||
|
|
||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
}
|
}, 0);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
@ -19,26 +19,22 @@ function onMsgRcv(event)
|
||||||
is(event.data, "args: undefined", "Unexpected cross origin dialog arguments.");
|
is(event.data, "args: undefined", "Unexpected cross origin dialog arguments.");
|
||||||
}
|
}
|
||||||
|
|
||||||
async function runTest() {
|
function runTest() {
|
||||||
await SpecialPowers.pushPrefEnv({ set: [[ "dom.disable_window_showModalDialog", false ]] });
|
if ("showModalDialog" in window) {
|
||||||
let iframe = document.createElement("iframe");
|
window.addEventListener("message", onMsgRcv);
|
||||||
document.body.appendChild(iframe);
|
|
||||||
await new Promise(resolve => {
|
|
||||||
iframe.addEventListener("load", resolve);
|
|
||||||
});
|
|
||||||
window.showModalDialog = iframe.contentWindow.showModalDialog;
|
|
||||||
|
|
||||||
window.addEventListener("message", onMsgRcv);
|
var result = window.showModalDialog("file_bug504862.html", "my args");
|
||||||
|
// NB: We used to clear returnValue on each navigation, but now we do a
|
||||||
|
// security check on access, so we can safely make returnValue live on
|
||||||
|
// the browsing context, per spec.
|
||||||
|
is(result, 3, "window sees previous dialog documents return value.");
|
||||||
|
|
||||||
var result = window.showModalDialog("file_bug504862.html", "my args");
|
result = window.showModalDialog("http://test1.example.com/tests/dom/tests/mochitest/bugs/file_bug504862.html", "my args");
|
||||||
// NB: We used to clear returnValue on each navigation, but now we do a
|
|
||||||
// security check on access, so we can safely make returnValue live on
|
|
||||||
// the browsing context, per spec.
|
|
||||||
is(result, 3, "window sees previous dialog documents return value.");
|
|
||||||
|
|
||||||
result = window.showModalDialog("http://test1.example.com/tests/dom/tests/mochitest/bugs/file_bug504862.html", "my args");
|
is(result, undefined, "Able to see return value from cross origin dialog.");
|
||||||
|
} else {
|
||||||
is(result, undefined, "Able to see return value from cross origin dialog.");
|
ok(true, "nothing to do in e10s mode");
|
||||||
|
}
|
||||||
|
|
||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,12 +220,11 @@ var expectedState;
|
||||||
|
|
||||||
function runtests()
|
function runtests()
|
||||||
{
|
{
|
||||||
SpecialPowers.pushPrefEnv({'set': [["dom.successive_dialog_time_limit", 3],
|
SpecialPowers.pushPrefEnv({'set': [["dom.successive_dialog_time_limit", 3]]},
|
||||||
["dom.disable_window_showModalDialog", false]]},
|
|
||||||
runtestsInner);
|
runtestsInner);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function runtestsInner()
|
function runtestsInner()
|
||||||
{
|
{
|
||||||
registerMockPromptService();
|
registerMockPromptService();
|
||||||
|
|
||||||
|
@ -306,13 +305,6 @@ async function runtestsInner()
|
||||||
|
|
||||||
w.close();
|
w.close();
|
||||||
|
|
||||||
let iframe = document.createElement("iframe");
|
|
||||||
document.body.appendChild(iframe);
|
|
||||||
await new Promise(resolve => {
|
|
||||||
iframe.addEventListener("load", resolve);
|
|
||||||
});
|
|
||||||
window.showModalDialog = iframe.contentWindow.showModalDialog;
|
|
||||||
|
|
||||||
// Test that showModalDialog() works normally and then gets blocked
|
// Test that showModalDialog() works normally and then gets blocked
|
||||||
// on the second call.
|
// on the second call.
|
||||||
if (window.showModalDialog) {
|
if (window.showModalDialog) {
|
||||||
|
|
|
@ -124,7 +124,8 @@ support-files = test_offsets.js
|
||||||
skip-if = toolkit == 'android' # bug 1230232 - Mouse doesn't select in the same way
|
skip-if = toolkit == 'android' # bug 1230232 - Mouse doesn't select in the same way
|
||||||
[test_showModalDialog.html]
|
[test_showModalDialog.html]
|
||||||
skip-if = e10s || toolkit == 'android' #Don't run modal tests on Android
|
skip-if = e10s || toolkit == 'android' #Don't run modal tests on Android
|
||||||
[test_showModalDialog_removed.html]
|
[test_showModalDialog_e10s.html]
|
||||||
|
run-if = e10s
|
||||||
[test_storagePermissionsAccept.html]
|
[test_storagePermissionsAccept.html]
|
||||||
[test_storagePermissionsLimitForeign.html]
|
[test_storagePermissionsLimitForeign.html]
|
||||||
[test_storagePermissionsReject.html]
|
[test_storagePermissionsReject.html]
|
||||||
|
|
|
@ -24,40 +24,27 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=862918
|
||||||
win.wrappedJSObject.go();
|
win.wrappedJSObject.go();
|
||||||
};
|
};
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
var someObj = { foo: 42, bar: "hi"};
|
||||||
|
var xurl = location.toString()
|
||||||
|
.replace('mochi.test:8888', 'example.org')
|
||||||
|
.replace('test_showModal', 'file_showModal');
|
||||||
|
if (xurl.indexOf('?') != -1)
|
||||||
|
xurl = xurl.substring(0, xurl.indexOf('?'));
|
||||||
|
is(showModalDialog('file_showModalDialog.html'), "rv: undefined");
|
||||||
|
is(showModalDialog(xurl), undefined);
|
||||||
|
is(showModalDialog('file_showModalDialog.html', 3), "rv: 3");
|
||||||
|
is(showModalDialog(xurl, 3), undefined);
|
||||||
|
is(showModalDialog('file_showModalDialog.html', someObj), "rv: " + someObj);
|
||||||
|
is(showModalDialog(xurl, someObj), undefined);
|
||||||
|
|
||||||
SpecialPowers.pushPrefEnv({ set: [[ "dom.disable_window_showModalDialog", false ]] }, doTest);
|
// Test sequential navigations.
|
||||||
async function doTest() {
|
is(showModalDialog('file_showModalDialog.html?http://mochi.test:8888', 4),
|
||||||
let iframe = document.createElement("iframe");
|
'rv: 4');
|
||||||
document.body.appendChild(iframe);
|
is(showModalDialog('file_showModalDialog.html?http://example.com', 4), undefined);
|
||||||
await new Promise(resolve => {
|
is(showModalDialog('file_showModalDialog.html?http://example.com,http://mochi.test:8888', 4), 'rv: 4');
|
||||||
iframe.addEventListener("load", resolve);
|
|
||||||
});
|
|
||||||
window.showModalDialog = iframe.contentWindow.showModalDialog;
|
|
||||||
|
|
||||||
var someObj = { foo: 42, bar: "hi"};
|
// This test used to assert after gc. Make sure it doesn't.
|
||||||
var xurl = location.toString()
|
SpecialPowers.gc();
|
||||||
.replace('mochi.test:8888', 'example.org')
|
|
||||||
.replace('test_showModal', 'file_showModal');
|
|
||||||
if (xurl.indexOf('?') != -1)
|
|
||||||
xurl = xurl.substring(0, xurl.indexOf('?'));
|
|
||||||
is(window.showModalDialog('file_showModalDialog.html'), "rv: undefined");
|
|
||||||
is(window.showModalDialog(xurl), undefined);
|
|
||||||
is(window.showModalDialog('file_showModalDialog.html', 3), "rv: 3");
|
|
||||||
is(window.showModalDialog(xurl, 3), undefined);
|
|
||||||
is(window.showModalDialog('file_showModalDialog.html', someObj), "rv: " + someObj);
|
|
||||||
is(window.showModalDialog(xurl, someObj), undefined);
|
|
||||||
|
|
||||||
// Test sequential navigations.
|
|
||||||
is(window.showModalDialog('file_showModalDialog.html?http://mochi.test:8888', 4),
|
|
||||||
'rv: 4');
|
|
||||||
is(window.showModalDialog('file_showModalDialog.html?http://example.com', 4), undefined);
|
|
||||||
is(window.showModalDialog('file_showModalDialog.html?http://example.com,http://mochi.test:8888', 4), 'rv: 4');
|
|
||||||
|
|
||||||
// This test used to assert after gc. Make sure it doesn't.
|
|
||||||
SpecialPowers.gc();
|
|
||||||
SimpleTest.finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -20,7 +20,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1077002
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
|
||||||
/** Test for showModalDialog unavailability in Firefox **/
|
/** Test for showModalDialog unavailability in e10s **/
|
||||||
|
|
||||||
// NB: This test runs in e10s only. In e10s showModalDialog should not
|
// NB: This test runs in e10s only. In e10s showModalDialog should not
|
||||||
// exist.
|
// exist.
|
|
@ -1221,7 +1221,6 @@ pref("dom.disable_window_open_feature.menubar", false);
|
||||||
pref("dom.disable_window_open_feature.resizable", true);
|
pref("dom.disable_window_open_feature.resizable", true);
|
||||||
pref("dom.disable_window_open_feature.minimizable", false);
|
pref("dom.disable_window_open_feature.minimizable", false);
|
||||||
pref("dom.disable_window_open_feature.status", true);
|
pref("dom.disable_window_open_feature.status", true);
|
||||||
pref("dom.disable_window_showModalDialog", true);
|
|
||||||
|
|
||||||
pref("dom.allow_scripts_to_close_windows", false);
|
pref("dom.allow_scripts_to_close_windows", false);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
[historical.window.html]
|
||||||
|
type: testharness
|
||||||
|
[showModalDialog() has been removed from the platform]
|
||||||
|
expected:
|
||||||
|
if debug and not e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
|
||||||
|
if not debug and not e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
|
||||||
|
if debug and not e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
|
||||||
|
if not debug and not e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
|
||||||
|
if not debug and not e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
|
||||||
|
if not debug and not e10s and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
|
||||||
|
if debug and not e10s and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
|
||||||
|
if debug and not e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
|
||||||
|
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
|
||||||
|
if not debug and not e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
|
||||||
|
|
|
@ -8,3 +8,8 @@
|
||||||
|
|
||||||
[A SecurityError exception must be thrown when window.onmousewheel is accessed from a different origin.]
|
[A SecurityError exception must be thrown when window.onmousewheel is accessed from a different origin.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[A SecurityError exception must be thrown when window.showModalDialog is accessed from a different origin.]
|
||||||
|
disabled:
|
||||||
|
if e10s: https://bugzilla.mozilla.org/show_bug.cgi?id=981796
|
||||||
|
|
||||||
|
|
|
@ -1477,6 +1477,10 @@
|
||||||
[DataTransfer interface object length]
|
[DataTransfer interface object length]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Window interface: operation showModalDialog(DOMString,any)]
|
||||||
|
disabled:
|
||||||
|
if e10s: https://bugzilla.mozilla.org/show_bug.cgi?id=981796
|
||||||
|
|
||||||
[Window interface: attribute oncancel]
|
[Window interface: attribute oncancel]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -1492,6 +1496,10 @@
|
||||||
[Window interface: operation createImageBitmap(ImageBitmapSource,long,long,long,long)]
|
[Window interface: operation createImageBitmap(ImageBitmapSource,long,long,long,long)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Window interface: window must inherit property "showModalDialog" with the proper type (34)]
|
||||||
|
disabled:
|
||||||
|
if e10s: https://bugzilla.mozilla.org/show_bug.cgi?id=981796
|
||||||
|
|
||||||
[Window interface: window must inherit property "oncancel" with the proper type (42)]
|
[Window interface: window must inherit property "oncancel" with the proper type (42)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -1504,6 +1512,10 @@
|
||||||
[Window interface: window must inherit property "onsort" with the proper type (93)]
|
[Window interface: window must inherit property "onsort" with the proper type (93)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Window interface: calling showModalDialog(DOMString,any) on window with too few arguments must throw TypeError]
|
||||||
|
disabled:
|
||||||
|
if e10s: https://bugzilla.mozilla.org/show_bug.cgi?id=981796
|
||||||
|
|
||||||
[Window interface: calling createImageBitmap(ImageBitmapSource,long,long,long,long) on window with too few arguments must throw TypeError]
|
[Window interface: calling createImageBitmap(ImageBitmapSource,long,long,long,long) on window with too few arguments must throw TypeError]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче