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>
11 document
.getElementById("identity").wrapperIdentity
= "identity";
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
.setOuterHTMLUseUndo(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
.setOuterHTMLUseUndo(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
.setOuterHTMLUseUndo(text
, next
);
44 function testEditTwoRoots(next
)
46 var text
= InspectorTest
.containerText
+ "<div>Additional node</div>";
47 InspectorTest
.setOuterHTMLUseUndo(text
, next
);
50 function testDupeNode(next
)
52 InspectorTest
.patchOuterHTML("<h2>Getting involved</h2>", "<h2>Getting involved</h2><h2>Getting involved</h2>", next
);
59 <body onload=
"onload()">
61 Tests undo for the DOMAgent.setOuterHTML protocol method (part
2).
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>