diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/the-img-element/img-src-in-synthetic-document.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/embedded-content/the-img-element/img-src-in-synthetic-document.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/img-src-in-synthetic-document.html b/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/img-src-in-synthetic-document.html new file mode 100644 index 0000000000..24c5567fb8 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/img-src-in-synthetic-document.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/whatwg/html/issues/9855"> +<link rel=help href="https://html.spec.whatwg.org/#reflecting-content-attributes-in-idl-attributes"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +test(() => { + const doc = document.implementation.createHTMLDocument(''); + const img = doc.createElement('img'); + img.setAttribute('src', '/test'); + doc.body.appendChild(img); + assert_equals(img.src, '/test'); +}, 'HTMLImageElement.src should return the string from the attribute in about:blank documents.'); +</script> |