Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / DOMImplementation / implementation-identity.html
blob9628823a754c4a05897945b784c03d25befc580a
1 <body>
2 <script>
3 if (window.testRunner)
4 testRunner.dumpAsText();
6 function print(message)
8 var paragraph = document.createElement("li");
9 paragraph.appendChild(document.createTextNode(message));
10 document.getElementById("console").appendChild(paragraph);
13 function test()
15 if (document.implementation != frames[0].document.implementation)
16 print("OK: Top-level document and iframe document have different DOMImplementation objects");
17 else
18 print("BUG: Top-level document and iframe document share a DOMImplementation object");
20 if (document.implementation === document.implementation)
21 print("OK: DOMImplementation object is cached");
22 else
23 print("BUG: DOMImplementation object is not cached");
25 </script>
26 <p>This test checks that DOMImplementation object is created per document.</p>
27 <p>If the test passes, you should see a few OK lines below.</p>
28 <p><ol id=console></ol></p>
29 <iframe src="about:blank" onload="test()"></iframe>
30 </body>