Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Element / remove.html
blobb1bd1b72babe64892165242603dd8ba4a14d5e7a
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <div id="test"></div>
4 <script>
6 description('This tests the DOM 4 remove method on an Element.');
8 var testDiv = document.getElementById('test');
9 var a = document.createElement('a');
10 testDiv.appendChild(a);
11 shouldBe('testDiv.childNodes.length', '1');
12 a.remove();
13 shouldBe('testDiv.childNodes.length', '0');
14 a.remove();
15 shouldBe('testDiv.childNodes.length', '0');
17 </script>