OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 | |
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> | |
8 | |
9 function onload() | |
10 { | |
11 document.getElementById("identity").wrapperIdentity = "identity"; | |
12 runTest(); | |
13 } | |
14 | |
15 function test() | |
16 { | |
17 InspectorTest.runTestSuite([ | |
18 function testSetUp(next) | |
19 { | |
20 InspectorTest.setUpTestSuite(next); | |
21 }, | |
22 | |
23 function testChangeMultipleThings(next) | |
24 { | |
25 var text = InspectorTest.containerText.replace(/<li>.*<\/li>/, ""); | |
26 text = text.replace("<h2>", "<h2 foo=\"bar\" bar=\"baz\">"); | |
27 InspectorTest.setOuterHTML(text, next); | |
28 }, | |
29 | |
30 function testChangeNestingLevel(next) | |
31 { | |
32 var text = InspectorTest.containerText.replace("<ul>", "<div><ul>"); | |
33 var text = text.replace("</ul>", "</ul></div>"); | |
34 InspectorTest.setOuterHTML(text, next); | |
35 }, | |
36 | |
37 function testSwapNodes(next) | |
38 { | |
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); | |
42 }, | |
43 | |
44 function testEditTwoRoots(next) | |
45 { | |
46 var text = InspectorTest.containerText + "<div>Additional node</div>
"; | |
47 InspectorTest.setOuterHTML(text, next); | |
48 }, | |
49 | |
50 function testDupeNode(next) | |
51 { | |
52 InspectorTest.patchOuterHTML("<h2>Getting involved</h2>", "<h2>Getti
ng involved</h2><h2>Getting involved</h2>", next); | |
53 } | |
54 ]); | |
55 } | |
56 </script> | |
57 </head> | |
58 | |
59 <body onload="onload()"> | |
60 <p> | |
61 Tests DOMAgent.setOuterHTML protocol method (part 2). | |
62 </p> | |
63 | |
64 <div id="container" style="display:none"> | |
65 <p>WebKit is used by <a href="http://www.apple.com/safari/">Safari</a>, Dashboar
d, 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> | |
75 | |
76 </body> | |
77 </html> | |
OLD | NEW |