summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/portals/portals-activate-no-browsing-context.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/portals/portals-activate-no-browsing-context.html')
-rw-r--r--testing/web-platform/tests/portals/portals-activate-no-browsing-context.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/testing/web-platform/tests/portals/portals-activate-no-browsing-context.html b/testing/web-platform/tests/portals/portals-activate-no-browsing-context.html
new file mode 100644
index 0000000000..ccf1e9504b
--- /dev/null
+++ b/testing/web-platform/tests/portals/portals-activate-no-browsing-context.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+promise_test(async t => {
+ assert_implements("HTMLPortalElement" in self);
+ let activatePromise = document.createElement('portal').activate();
+ await promise_rejects_dom(t, 'InvalidStateError', activatePromise);
+}, "A portal with nothing in it cannot be activated");
+</script>