Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / mutation-during-replace-child.html
blob3f05fb751b335d8b2a179215cc55e8678dc35b28
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <div>
8 <div id="target">
9 <b></b><b id="oldChild"></b><b></b>
10 </div>
11 <div id="newChild"></div>
12 </div>
14 <script>
15 description("Ensures that replaceChild() throws an exception if mutation even handler does something wrong");
16 var target = document.getElementById('target');
17 var oldChild = document.getElementById('oldChild');
18 var newChild = document.getElementById('newChild');
20 function handler(){
21 document.removeEventListener("DOMNodeRemoved", handler, false);
22 newChild.parentNode.removeChild(newChild);
23 target.parentNode.removeChild(target);
24 newChild.appendChild(target);
26 document.addEventListener("DOMNodeRemoved", handler, false);
27 shouldThrow("target.replaceChild(newChild, oldChild);", '"HierarchyRequestError: Failed to execute \'replaceChild\' on \'Node\': The new child element contains the parent."');
28 </script>
29 </body>
30 </html>