Revision 859e67ce666775ccd471e4693d85d4e90989e270 authored by Bernie Thompson on 29 March 2018, 17:39:39 UTC, committed by Chromium WPT Sync on 29 March 2018, 17:39:39 UTC
BUG=chromium:825100 TEST=None This reverts commit f2d2fe87028de36a489f7db3f5fb28da2e9d9b2b. Change-Id: I01e5962e0b52ad63feca36513db19253a5ade530
1 parent a149250
multiple.sub.html
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./support/helper.js"></script>
<body>
<script>
async_test(t => {
var i = document.createElement('iframe');
i.src = "./support/xfo.py?value=SAMEORIGIN&value2=SAMEORIGIN";
wait_for_message_from(i, t)
.then(t.step_func_done(e => {
assert_equals(e.data, "Loaded");
i.remove();
}));
document.body.appendChild(i);
}, "`XFO: SAMEORIGIN; XFO: SAMEORIGIN` allows same-origin framing.");
async_test(t => {
var i = document.createElement('iframe');
i.src = "./support/xfo.py?value=SAMEORIGIN&value2=DENY";
assert_no_message_from(i, t);
i.onload = t.step_func_done(_ => {
assert_throws("SecurityError", function () { return i.contentDocument; });
i.remove();
});
document.body.appendChild(i);
}, "`XFO: SAMEORIGIN; XFO: DENY` blocks same-origin framing.");
async_test(t => {
var i = document.createElement('iframe');
i.src = "./support/xfo.py?value=DENY&value2=SAMEORIGIN";
assert_no_message_from(i, t);
i.onload = t.step_func_done(_ => {
assert_throws("SecurityError", function () { return i.contentDocument; });
i.remove();
});
document.body.appendChild(i);
}, "`XFO: DENY; XFO: SAMEORIGIN` blocks same-origin framing.");
async_test(t => {
var i = document.createElement('iframe');
i.src = "./support/xfo.py?value=INVALID&value2=SAMEORIGIN";
assert_no_message_from(i, t);
i.onload = t.step_func_done(_ => {
assert_throws("SecurityError", function () { return i.contentDocument; });
i.remove();
});
document.body.appendChild(i);
}, "`XFO: INVALID; XFO: SAMEORIGIN` blocks same-origin framing.");
async_test(t => {
var i = document.createElement('iframe');
i.src = "./support/xfo.py?value=SAMEORIGIN&value2=INVALID";
assert_no_message_from(i, t);
i.onload = t.step_func_done(_ => {
assert_throws("SecurityError", function () { return i.contentDocument; });
i.remove();
});
document.body.appendChild(i);
}, "`XFO: SAMEORIGIN; XFO: INVALID` blocks same-origin framing.");
async_test(t => {
var i = document.createElement('iframe');
i.src = "http://{{domains[www]}}:{{ports[http][0]}}/x-frame-options/support/xfo.py?value=SAMEORIGIN&value2=SAMEORIGIN";
assert_no_message_from(i, t);
i.onload = t.step_func_done(_ => {
assert_throws("SecurityError", function () { return i.contentDocument; });
i.remove();
});
document.body.appendChild(i);
}, "`XFO: SAMEORIGIN; XFO: SAMEORIGIN` blocks cross-origin framing.");
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...