Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / NodeList / nodelist-moved-to-fragment-2.html
blob711908b91e0cfffd3ed135422ce3f1538ebc6957
1 <!DOCTYPE html>
2 <html>
3 <body onload="runTest()">
4 <p>This tests moving a node list that uses string gets adopted to a new document properly.<br>
5 The test passes if WebKit does not hit an assertion.</p>
6 <script>
8 if (window.testRunner) {
9 testRunner.dumpAsText();
10 testRunner.waitUntilDone();
13 function runTest()
15 var newDocument = document.implementation.createDocument(null, "someElement", null);
16 var fragment = document.createDocumentFragment();
17 newDocument.documentElement.getElementsByClassName("foo");
18 fragment.appendChild(newDocument.documentElement);
20 setTimeout(function () {
21 document.querySelector('p').innerHTML += '<br><br>PASS';
22 if (window.testRunner)
23 testRunner.notifyDone();
24 }, 0);
27 </script>
28 </body>
29 </html>