Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / elements / edit / set-outer-html-2.html
blobbee53ba61095e3f5626b1994fcfa7e57a1e19f84
1 <html>
2 <head>
4 <script src="../../../http/tests/inspector/inspector-test.js"></script>
5 <script src="../../../http/tests/inspector/elements-test.js"></script>
6 <script src="set-outer-html-test.js"></script>
7 <script>
9 function onload()
11 document.getElementById("identity").wrapperIdentity = "identity";
12 runTest();
15 function test()
17 InspectorTest.runTestSuite([
18 function testSetUp(next)
20 InspectorTest.setUpTestSuite(next);
23 function testChangeMultipleThings(next)
25 var text = InspectorTest.containerText.replace(/<li>.*<\/li>/, "");
26 text = text.replace("<h2>", "<h2 foo=\"bar\" bar=\"baz\">");
27 InspectorTest.setOuterHTML(text, next);
30 function testChangeNestingLevel(next)
32 var text = InspectorTest.containerText.replace("<ul>", "<div><ul>");
33 var text = text.replace("</ul>", "</ul></div>");
34 InspectorTest.setOuterHTML(text, next);
37 function testSwapNodes(next)
39 var text = InspectorTest.containerText.replace("<h2>Getting involved</h2>", "");
40 var text = text.replace("</div>", "<h2>Getting involved</h2></div>");
41 InspectorTest.setOuterHTML(text, next);
44 function testEditTwoRoots(next)
46 var text = InspectorTest.containerText + "<div>Additional node</div>";
47 InspectorTest.setOuterHTML(text, next);
50 function testDupeNode(next)
52 InspectorTest.patchOuterHTML("<h2>Getting involved</h2>", "<h2>Getting involved</h2><h2>Getting involved</h2>", next);
54 ]);
56 </script>
57 </head>
59 <body onload="onload()">
60 <p>
61 Tests DOMAgent.setOuterHTML protocol method (part 2).
62 </p>
64 <div id="container" style="display:none">
65 <p>WebKit is used by <a href="http://www.apple.com/safari/">Safari</a>, Dashboard, etc..</p>
66 <h2>Getting involved</h2>
67 <p id="identity">There are many ways to get involved. You can:</p>
68 <ul>
69 <li></li>
70 </ul>
71 <ul>
72 <li></li>
73 </ul>
74 </div>
76 </body>
77 </html>