OLD | NEW |
| (Empty) |
1 <html id="html" xmlns="http://www.w3.org/1999/xhtml"> | |
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 //<![CDATA[ | |
9 | |
10 function onload() | |
11 { | |
12 document.getElementById("identity").wrapperIdentity = "identity"; | |
13 runTest(); | |
14 } | |
15 | |
16 function test() | |
17 { | |
18 InspectorTest.runTestSuite([ | |
19 function testSetUp(next) | |
20 { | |
21 InspectorTest.setUpTestSuite(next); | |
22 }, | |
23 | |
24 function testChangeCharacterData(next) | |
25 { | |
26 InspectorTest.patchOuterHTML("Getting involved", "Getting not involv
ed", next); | |
27 }, | |
28 | |
29 function testChangeAttributes(next) | |
30 { | |
31 InspectorTest.patchOuterHTML("<a href", "<a foo=\"bar\" href", next)
; | |
32 }, | |
33 | |
34 function testRemoveLastChild(next) | |
35 { | |
36 InspectorTest.patchOuterHTML("Getting involved", "", next); | |
37 }, | |
38 | |
39 function testSplitNode(next) | |
40 { | |
41 InspectorTest.patchOuterHTML("Getting involved", "Getting</h2><h2>in
volved", next); | |
42 }, | |
43 | |
44 function testChangeNodeName(next) | |
45 { | |
46 InspectorTest.patchOuterHTML("<h2>Getting involved</h2>", "<h3>Getti
ng involved</h3>", next); | |
47 }, | |
48 | |
49 function testInvalidDocumentDoesNotCrash(next) | |
50 { | |
51 var htmlId = InspectorTest.expandedNodeWithId("html").id; | |
52 InspectorTest.DOMAgent.setOuterHTML(htmlId, "foo", callback); | |
53 | |
54 function callback() | |
55 { | |
56 InspectorTest.addResult("PASS: No crash"); | |
57 next(); | |
58 } | |
59 } | |
60 ]); | |
61 } | |
62 //]]> | |
63 </script> | |
64 </head> | |
65 | |
66 <body onload="onload()"> | |
67 <p> | |
68 Tests DOMAgent.setOuterHTML protocol method against an XHTML document. | |
69 </p> | |
70 | |
71 <div id="container" style="display:none"> | |
72 <p>WebKit is used by <a href="http://www.apple.com/safari/">Safari</a>, Dashboar
d, etc.</p> | |
73 <h2>Getting involved</h2> | |
74 <p id="identity">There are many ways to get involved. You can:</p> | |
75 </div> | |
76 | |
77 </body> | |
78 </html> | |
OLD | NEW |