diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/srcdoc-anchor.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/srcdoc-anchor.html | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/srcdoc-anchor.html b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/srcdoc-anchor.html new file mode 100644 index 0000000000..cf26c28f08 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/srcdoc-anchor.html @@ -0,0 +1,17 @@ +<title>Verify srcdoc content loads when src is about:srcdoc#foo.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<iframe id=myframe srcdoc='srcdoc_text' src='about:srcdoc#foo'></iframe> + +<script> + async_test(function(t) { + // Verify that the srcdoc content is loaded before we start. + window.onload = t.step_func_done(() => { + assert_true(typeof myframe.contentDocument !== 'undefined', + 'iframe has contentDocument'); + assert_equals(myframe.contentDocument.body.innerText, 'srcdoc_text', + 'iframe contains srcdoc content'); + }, ''); + }, 'Verify srcdoc content loads when src is about:srcdoc#foo.'); +</script> |