Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: LayoutTests/inspector/elements/mutate-unknown-node.html-disabled

Issue 1158883003: DevTools: shard inspector/elements tests for faster execution. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/elements-test.js"></script>
5 <script>
6
7 function appendChild()
8 {
9 var hidden = document.getElementById("hidden");
10 var child = document.createElement("div");
11 child.setAttribute("id", "appended");
12 hidden.appendChild(child);
13 }
14
15 function removeChild()
16 {
17 var child = document.getElementById("appended");
18 child.parentNode.removeChild(child);
19 }
20
21 function modifyAttribute()
22 {
23 var hidden = document.getElementById("hidden");
24 hidden.setAttribute("foo", "bar");
25 }
26
27 function test()
28 {
29 function listener(type, event)
30 {
31 node = event.data.node || event.data;
32 InspectorTest.addResult("DOMAgent event fired. Should only happen once f or output node: " + type + " " + event.data.nodeName() + "#" + event.data.getAtt ribute("id"));
33 }
34
35 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.AttrModi fied, listener.bind(this, "DOMAttrModified"));
36 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.Characte rDataModified, listener.bind(this, "DOMCharacterDataModified"));
37 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.NodeInse rted, listener.bind(this, "DOMNodeInserted"));
38 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.NodeRemo ved, listener.bind(this, "DOMNodeRemoved"));
39
40 WebInspector.domAgent.requestDocument(step0.bind(this));
41
42 function step0()
43 {
44 InspectorTest.evaluateInPage("appendChild()", step1);
45 }
46
47 function step1()
48 {
49 InspectorTest.addResult("Appended");
50 InspectorTest.evaluateInPage("removeChild()", step2);
51 }
52
53 function step2()
54 {
55 InspectorTest.addResult("Removed");
56 InspectorTest.evaluateInPage("modifyAttribute()", step3);
57 }
58
59 function step3()
60 {
61 InspectorTest.addResult("Attribute modified");
62 InspectorTest.evaluateInPage("true", step4);
63 }
64
65 function step4()
66 {
67 InspectorTest.addResult("========= Result DOMAgent tree ========");
68 InspectorTest.dumpDOMAgentTree();
69
70 InspectorTest.completeTest();
71 }
72 }
73
74 </script>
75 </head>
76
77 <body onload="runTest()">
78 <p>
79 Tests that elements panel does not receive events upon changes to the undiscover ed nodes.
80 </p>
81
82 <div>
83 <div id="hidden">
84 </div>
85 </div>
86
87 </body>
88 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698