Update web-platform-tests to revision 3b3585e368841b77caea8576fa56cef91c3fbdf0

This commit is contained in:
Ms2ger 2016-09-26 10:52:50 +02:00
parent d00639c55f
commit 3b4f0ec0bb
541 changed files with 14609 additions and 3288 deletions

View file

@ -299,7 +299,7 @@ addTest(function() {
checkFunction(get_self_parent, Function.prototype);
checkFunction(get_parent_A, Function.prototype);
checkFunction(get_parent_B, B.Function.prototype);
}, "Same-origin obsevers get different accessors for cross-origin Window");
}, "Same-origin observers get different accessors for cross-origin Window");
addTest(function() {
var set_self_href = Object.getOwnPropertyDescriptor(window.location, 'href').set;

View file

@ -0,0 +1,28 @@
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>Origin of document produced from a 'data:' URL</title>
<link rel="help" href="https://html.spec.whatwg.org/multipage/browsers.html#origin">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
async_test(function (t) {
window.addEventListener("message", t.step_func_done(function (e) {
assert_equals(e.origin, "null", "Messages sent from a 'data:' URL should have an opaque origin (which serializes to 'null').");
assert_throws("SecurityError", function () {
var couldAccessCrossOriginProperty = e.source.location.href;
}, "The 'data:' frame should be cross-origin.")
}));
var i = document.createElement('iframe');
i.src = "data:text/html,<script>" +
" window.parent.postMessage('Hello!', '*');" +
"</scr" + "ipt>";
document.body.appendChild(i);
}, "The origin of a 'data:' document in a frame is opaque.");
</script>
</body>
</html>