Update web-platform-tests to revision 7a767a52741f628430ffbbed46e7f3df68ba3534

Fixes #15648.
This commit is contained in:
Ms2ger 2017-02-20 11:44:42 +01:00
parent a1e4c547f0
commit 4fadf9b0b6
1184 changed files with 22551 additions and 9856 deletions

View file

@ -0,0 +1,18 @@
<!doctype html>
<title>Origin check in document.open() - Basic usage</title>
<link rel="author" title="Jochen Eisinger" href="mailto:jochen@chromium.org">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#opening-the-input-stream">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/resources/common.js"></script>
<body>
<script>
testInIFrame(undefined, (ctx) => {
try {
ctx.iframes[0].contentDocument.open();
} catch (e) {
assert_unreached("Opening a same origin document throws");
}
}, "It should be possible to open same origin documents.");
</script>
</body>

View file

@ -0,0 +1,16 @@
<!doctype html>
<title>Origin check in document.open() - same origin-domain (but not same origin) documents</title>
<link rel="author" title="Jochen Eisinger" href="mailto:jochen@chromium.org">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#opening-the-input-stream">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/resources/common.js"></script>
<body>
<script>
testInIFrame("http://{{host}}:{{ports[http][1]}}/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/set-document-domain.html", (ctx) => {
document.domain = document.domain;
var doc = ctx.iframes[0].contentDocument;
assert_throws("SecurityError", doc.open.bind(doc), "Opening a same origin-domain (but not same origin) document doesn't throw.");
}, "It should not be possible to open same origin-domain (but not same origin) documents.");
</script>
</body>

View file

@ -0,0 +1,4 @@
<!doctype html>
<script>
document.domain = document.domain;
</script>