Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444

This commit is contained in:
Josh Matthews 2017-04-17 12:06:02 +10:00 committed by Anthony Ramine
parent 25e8bf69e6
commit 665817d2a6
35333 changed files with 1818077 additions and 16036 deletions

View file

@ -14,5 +14,13 @@ testInIFrame(undefined, (ctx) => {
assert_unreached("Opening a same origin document throws");
}
}, "It should be possible to open same origin documents.");
testInIFrame(undefined, (ctx) => {
try {
ctx.iframes[0].contentDocument.write("");
} catch (e) {
assert_unreached("Implicitly opening a same origin document throws");
}
}, "It should be possible to implicitly open same origin documents.");
</script>
</body>

View file

@ -12,5 +12,11 @@ testInIFrame("http://{{host}}:{{ports[http][1]}}/html/webappapis/dynamic-markup-
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.");
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.write.bind(doc, ""), "Implicitly opening a same origin-domain (but not same origin) document doesn't throw.");
}, "It should not be possible to implicitly open same origin-domain (but not same origin) documents.");
</script>
</body>