Commit b479b5f6 authored by Kevin McNee's avatar Kevin McNee Committed by Commit Bot

Move portals web tests into WPT

There's nothing in these tests that is blink specific, so we make them
web platform tests.

Bug: None
Change-Id: I88a17bcfa7e97f890d9331bdd79857e70f6c6ea9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1853485Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704771}
parent ea0fd78e
<!DOCTYPE html>
<title>Portals API test</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
test(function() {
assert_true(document.createElement('portal') instanceof HTMLPortalElement);
}, "portal element exists")
}, "portal element exists");
</script>
</body>
<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
test(t => {
test(() => {
let portal = document.createElement("portal");
xmlDoc = document.implementation.createDocument("", null);
let xmlDoc = document.implementation.createDocument("", null);
xmlDoc.appendChild(portal);
}, "inserting a portal element into an XML document shouldn't crash or throw");
test(t => {
test(() => {
let iframe = document.createElement("iframe");
document.body.appendChild(iframe);
var doc = iframe.contentDocument;
let doc = iframe.contentDocument;
iframe.remove();
let portal = document.createElement("portal");
doc.body.appendChild(portal);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment