Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / dom-method-document-change.html
blob94e922a51d76f79eac0f8f0336c4264fede89d1d
1 <html>
2 <head>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
7 handler = function()
9 this.removeEventListener("DOMNodeRemoved", handler, false);
10 doc.adoptNode(this.parentElement);
13 showFailure = function(s)
15 document.body.innerHTML = "FAILURE: " + s;
18 window.onload = function()
20 element1 = document.createElement("x");
21 element2 = document.createElement("x");
22 element3 = document.createElement("x");
23 parent = document.createElement("x");
24 dummy = document.createElement("x");
26 doc = document.implementation.createHTMLDocument();
28 parent.appendChild(element1);
29 element1.addEventListener("DOMNodeRemoved", handler, false);
30 try {
31 document.body.appendChild(element1);
32 } catch (e) { }
33 if (element1.ownerDocument != element1.parentElement.ownerDocument)
34 return showFailure("appendChild");
36 document.adoptNode(parent);
37 parent.appendChild(element2);
38 try {
39 doc.body.insertBefore(element2, dummy);
40 } catch (e) { }
41 if (element2.ownerDocument != element2.parentElement.ownerDocument)
42 return showFailure("insertBefore");
44 parent.appendChild(element3);
45 try {
46 doc.body.replaceChild(element3, dummy);
47 } catch (e) { }
48 if (element3.ownerDocument != element3.parentElement.ownerDocument)
49 return showFailure("replaceChild");
51 </script>
52 </head>
53 <body>SUCCESS</body>
54 </html>