Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / NodeIterator / detach-no-op.html
blob9db5cc1b2f7e5367081fb2f0f481e2feb5dc7b7f
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="help" href="http://dom.spec.whatwg.org/#dom-nodeiterator-detach">
5 <script src="../../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <script>
9 description("This test checks that NodeIterator.detach() is a no-op.");
11 function createSampleDOM()
13 var div = document.createElement('div');
14 div.id = 'a';
15 div.innerHTML = '<div id="b">';
16 return div;
19 var root = createSampleDOM();
20 var iterator = document.createNodeIterator(root);
21 shouldBeEqualToString('iterator.nextNode().id', 'a');
22 shouldNotThrow('iterator.detach()');
23 shouldBeEqualToString('iterator.nextNode().id', 'b');
24 </script>
25 </body>
26 </html>