Home | History | Annotate | Download | only in DOMImplementation
      1 <body>
      2 <script>
      3 if (window.layoutTestController)
      4     layoutTestController.dumpAsText();
      5 
      6 function print(message)
      7 {
      8     var paragraph = document.createElement("li");
      9     paragraph.appendChild(document.createTextNode(message));
     10     document.getElementById("console").appendChild(paragraph);
     11 }
     12 
     13 function test()
     14 {
     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");
     19 
     20     if (document.implementation === document.implementation)
     21         print("OK: DOMImplementation object is cached");
     22     else
     23         print("BUG: DOMImplementation object is not cached");
     24 }
     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>
     31