зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1373513 - Part 2: Revert Bug 1364367. r=ckerschb
Revert what we did in Bug1364367, as data URI for -moz-binding should be same origin.
This commit is contained in:
Родитель
94d1d69dc1
Коммит
41473dd86d
|
@ -24,7 +24,6 @@ support-files =
|
|||
[test_bug372769.html]
|
||||
[test_bug378866.xhtml]
|
||||
[test_bug379959.html]
|
||||
[test_bug379959_legacy.html]
|
||||
[test_bug389322.xhtml]
|
||||
[test_bug397934.html]
|
||||
[test_bug400705.xhtml]
|
||||
|
|
|
@ -6,10 +6,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=379959
|
|||
<head>
|
||||
<title>Test for Bug 379959</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script>
|
||||
// TODO: Bug 1324406: Treat 'data:' documents as unique, opaque origins
|
||||
SpecialPowers.setBoolPref("security.data_uri.unique_opaque_origin", true);
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body onload="runTest();">
|
||||
|
@ -37,7 +33,7 @@ function receiveMessage(e) {
|
|||
is(e.origin, "http://mochi.test:8888", "wrong sender!");
|
||||
|
||||
if (e.data.test === "dataIsAllowed") {
|
||||
is(e.data.result, 0, "data-url load should have blocked");
|
||||
is(e.data.result, 1, "data-url load should have succeeded");
|
||||
seenData = true;
|
||||
}
|
||||
else if (e.data.test === "sameOriginIsAllowed") {
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=379959
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 379959</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script>
|
||||
// TODO: Bug 1324406: Treat 'data:' documents as unique, opaque origins
|
||||
SpecialPowers.setBoolPref("security.data_uri.unique_opaque_origin", false);
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body onload="runTest();">
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=379959">Mozilla Bug 379959</a>
|
||||
<p id="display">
|
||||
Note: In order to re-run this test correctly you need to shift-reload
|
||||
rather than simply reload. If you just reload we will restore the
|
||||
previous url in the iframe which will result in an extra unexpected
|
||||
message.
|
||||
</p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<iframe id="dataFrame"></iframe>
|
||||
<iframe id="originFrame"></iframe>
|
||||
|
||||
<pre id="test">
|
||||
<script class="testbody" type="application/javascript">
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var seenData = false;
|
||||
var seenSameOrigin = false;
|
||||
var seenCrossOrign = false;
|
||||
|
||||
function receiveMessage(e) {
|
||||
is(e.origin, "http://mochi.test:8888", "wrong sender!");
|
||||
|
||||
if (e.data.test === "dataIsAllowed") {
|
||||
is(e.data.result, 1, "data-url load should have succeeded");
|
||||
seenData = true;
|
||||
}
|
||||
else if (e.data.test === "sameOriginIsAllowed") {
|
||||
is(e.data.result, 1, "same site load should have succeeded");
|
||||
seenSameOrigin = true;
|
||||
}
|
||||
else if (e.data.test === "crossOriginIsBlocked") {
|
||||
is(e.data.result, 0, "cross site load should have failed");
|
||||
seenCrossOrign = true;
|
||||
}
|
||||
else {
|
||||
ok (false, "unrecognized test");
|
||||
}
|
||||
|
||||
if (seenData && seenSameOrigin && seenCrossOrign) {
|
||||
window.removeEventListener("message", receiveMessage);
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener("message", receiveMessage);
|
||||
|
||||
function runTest() {
|
||||
// make sure data: is allowed
|
||||
document.getElementById('dataFrame').src = "file_bug379959_data.html";
|
||||
// make sure same-origin is allowed but cross site is blocked
|
||||
document.getElementById('originFrame').src = "file_bug379959_cross.html";
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче