4 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
5 <script src=
"../../../http/tests/inspector/elements-test.js"></script>
14 InspectorTest
.runTestSuite([
15 function testSetUp(next
)
17 InspectorTest
.expandElementsTree(step1
);
20 htmlNode
= InspectorTest
.expandedNodeWithId("html");
21 headNode
= InspectorTest
.expandedNodeWithId("head");
22 bodyNode
= InspectorTest
.expandedNodeWithId("body");
27 function testSetBody(next
)
29 InspectorTest
.DOMAgent
.setOuterHTML(bodyNode
.id
, "<body>New body content</body>", dumpHTML(next
));
32 function testInsertComments(next
)
34 InspectorTest
.DOMAgent
.setOuterHTML(bodyNode
.id
, "<!-- new comment between head and body --><body>New body content</body>", dumpHTML(next
));
37 function testSetHead(next
)
39 InspectorTest
.DOMAgent
.setOuterHTML(headNode
.id
, "<head><!-- new head content --></head>", dumpHTML(next
));
42 function testSetHTML(next
)
44 InspectorTest
.DOMAgent
.setOuterHTML(htmlNode
.id
, "<html><head><!-- new head content --></head><body>Setting body as a part of HTML.</body></html>", dumpHTML(next
));
48 function dumpHTML(next
)
52 InspectorTest
.DOMAgent
.getOuterHTML(htmlNode
.id
, callback
);
53 function callback(error
, text
)
55 InspectorTest
.addResult(error
? error
: text
);
67 Tests DOMAgent.setOuterHTML invoked on body tag. See https://bugs.webkit.org/show_bug.cgi?id=
62272.
68 <iframe src=
"../resources/set-outer-html-body-iframe.html" onload=
"runTest()"></iframe>