diff options
Diffstat (limited to 'LayoutTests/fast/dom/DOMImplementation/implementation-identity.html')
-rw-r--r-- | LayoutTests/fast/dom/DOMImplementation/implementation-identity.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/DOMImplementation/implementation-identity.html b/LayoutTests/fast/dom/DOMImplementation/implementation-identity.html new file mode 100644 index 0000000..2b3c56c --- /dev/null +++ b/LayoutTests/fast/dom/DOMImplementation/implementation-identity.html @@ -0,0 +1,30 @@ +<body> +<script> +if (window.layoutTestController) + layoutTestController.dumpAsText(); + +function print(message) +{ + var paragraph = document.createElement("li"); + paragraph.appendChild(document.createTextNode(message)); + document.getElementById("console").appendChild(paragraph); +} + +function test() +{ + if (document.implementation != frames[0].document.implementation) + print("OK: Top-level document and iframe document have different DOMImplementation objects"); + else + print("BUG: Top-level document and iframe document share a DOMImplementation object"); + + if (document.implementation === document.implementation) + print("OK: DOMImplementation object is cached"); + else + print("BUG: DOMImplementation object is not cached"); +} +</script> +<p>This test checks that DOMImplementation object is created per document.</p> +<p>If the test passes, you should see a few OK lines below.</p> +<p><ol id=console></ol></p> +<iframe src="about:blank" onload="test()"></iframe> +</body> |