diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/html/semantics/permission-element | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/semantics/permission-element')
-rw-r--r-- | testing/web-platform/tests/html/semantics/permission-element/no-end-tag-no-contents.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/permission-element/no-end-tag-no-contents.html b/testing/web-platform/tests/html/semantics/permission-element/no-end-tag-no-contents.html new file mode 100644 index 0000000000..5fcce1421b --- /dev/null +++ b/testing/web-platform/tests/html/semantics/permission-element/no-end-tag-no-contents.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> +<!--The permission element should have no end tag or content. + Therefore the parsing should stop after the beginning tag, and the following + element and text will become part of the 'body' element's contents. +--> +<permission type="geolocation"><span>this is some text</span></permission> + +<script> + test(function(){ + assert_equals(3, document.body.childElementCount); // permission, span, script + assert_equals(document.body.innerText, "this is some text", "The text should be part of the 'body' element's text"); + + assert_true(document.body.children[0] instanceof HTMLPermissionElement, "First element should be a permission element"); + var permission = document.body.children[0]; + assert_equals(permission.innerText, "", "The permission element should have no text"); + assert_equals(permission.childElementCount, 0, "The permission element should have no children"); + + assert_true(document.body.children[1] instanceof HTMLSpanElement, "Second element should be a span element"); + var span = document.body.children[1]; + assert_equals(span.innerText, "this is some text", "The span element should contain the text"); + }, "The permission element should have no end tag or contents"); +</script> +</body>
\ No newline at end of file |