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/scripting-1/the-template-element/template-element/template-descendant-frameset.html | |
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/scripting-1/the-template-element/template-element/template-descendant-frameset.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/scripting-1/the-template-element/template-element/template-descendant-frameset.html | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-template-element/template-element/template-descendant-frameset.html b/testing/web-platform/tests/html/semantics/scripting-1/the-template-element/template-element/template-descendant-frameset.html new file mode 100644 index 0000000000..ce20a7413e --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-template-element/template-element/template-descendant-frameset.html @@ -0,0 +1,62 @@ +<!DOCTYPE html> +<html> +<head> +<title>HTML Templates: Template element as a descendant of the frameset element.</title> +<meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru"> +<meta name="assert" content="Template element can not be a descendant of the frameset element"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#parsing-main-inframeset"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src='/html/resources/common.js'></script> +</head> +<body> +<div id="log"></div> +<script type="text/javascript"> + +testInIFrame('../resources/template-descendant-frameset.html', function(context) { + var doc = context.iframes[0].contentDocument; + + var frameset = doc.querySelector('frameset'); + + assert_equals(frameset.querySelector('template'), null, + 'Template element should not be a descendant of the frameset element'); + +}, 'Template element as a descendant of the frameset element. Test loading from a file'); + + +testInIFrame('../resources/template-descendant-frameset.html', function(context) { + var doc = context.iframes[0].contentDocument; + + var frameset = doc.querySelector('frameset'); + + frameset.innerHTML = ''; + assert_equals(doc.querySelector('template'), null, + 'Initial conditions are not satisfied'); + + frameset.innerHTML = '<template>some text</template>'; + + assert_equals(frameset.querySelector('template'), null, + 'Template element should not be a descendant of the frameset element'); + +}, 'Template element as a descendant of the frameset element. ' + + 'Test template element is assigned to frameset\'s innerHTML)'); + + +testInIFrame('../resources/template-descendant-frameset.html', function(context) { + var doc = context.iframes[0].contentDocument; + + var frameset = doc.querySelector('frameset'); + + var template = doc.createElement('template'); + frameset.appendChild(template); + + assert_equals(frameset.querySelectorAll('template').length, 1, + 'Template element should be a descendant of the frameset element'); + +}, 'Template element as a descendant of the frameset element. ' + + 'Test template element appended to frameset by appendChild()'); + + +</script> +</body> +</html> |