summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/inspector/elements/set-outer-html.html
blob: 82ce78a87eedaf4395c6a237e01ed14746b7440d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<html>
<head>

<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/elements-test.js"></script>
<script src="set-outer-html-test.js"></script>
<script>

function onload()
{
    document.getElementById("identity").wrapperIdentity = "identity";
    runTest();
}

function test()
{
    InspectorTest.runTestSuite([
        function testSetUp(next)
        {
            InspectorTest.setUpTestSuite(next);
        },

        function testChangeCharacterData(next)
        {
            InspectorTest.patchOuterHTML("Getting involved", "Getting not involved", next);
        },

        function testChangeAttributes(next)
        {
            InspectorTest.patchOuterHTML("<a href", "<a foo=\"bar\" href", next);
        },

        function testRemoveLastChild(next)
        {
            InspectorTest.patchOuterHTML("Getting involved", "", next);
        },

        function testSplitNode(next)
        {
            InspectorTest.patchOuterHTML("Getting involved", "Getting</h2><h2>involved", next);
        },

        function testChangeNodeName(next)
        {
            InspectorTest.patchOuterHTML("<h2>Getting involved</h2>", "<h3>Getting involved</h3>", next);
        }
    ]);
}
</script>
</head>

<body onload="onload()">
<p>
Tests DOMAgent.setOuterHTML protocol method.
</p>

<div id="container" style="display:none">
<p>WebKit is used by <a href="http://www.apple.com/safari/">Safari</a>, Dashboard, etc.</a>.</p>
<h2>Getting involved</h2>
<p id="identity">There are many ways to get involved. You can:</p>
</div>

</body>
</html>