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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/edit/edit-dom-actions-2.html

Issue 1875373002: DevTools: split edit-dom-actions.html into three tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split into two tests Created 4 years, 8 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
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 src="edit-dom-test.js"></script>
6 <script>
7
8 function test()
9 {
10 // Save time on style updates.
11 WebInspector.StylesSidebarPane.prototype.update = function() {};
12 WebInspector.MetricsSidebarPane.prototype.update = function() {};
13
14 InspectorTest.runTestSuite([
15 function testSetUp(next)
16 {
17 InspectorTest.expandElementsTree(next);
18 },
19
20 function testSetAttribute(next)
21 {
22 InspectorTest.domActionTestForNodeId("testSetAttribute", "node-to-se t-attribute", testBody, next);
23
24 function testBody(node, done)
25 {
26 InspectorTest.editNodePartAndRun(node, "webkit-html-attribute", "bar=\"edited attribute\"", done, true);
27 }
28 },
29
30 function testSetScriptableAttribute(next)
31 {
32 InspectorTest.domActionTestForNodeId("testSetScriptableAttribute", " node-to-set-scriptable-attribute", testBody, next);
33
34 function testBody(node, done)
35 {
36 InspectorTest.editNodePartAndRun(node, "webkit-html-attribute", "onclick=\"alert(2)\"", done, true);
37 }
38 },
39
40 function testRemoveAttribute(next)
41 {
42 InspectorTest.domActionTestForNodeId("testRemoveAttribute", "node-to -remove-attribute", testBody, next);
43
44 function testBody(node, done)
45 {
46 InspectorTest.editNodePartAndRun(node, "webkit-html-attribute", "", done, true);
47 }
48 },
49
50 function testAddAttribute(next)
51 {
52 InspectorTest.doAddAttribute("testAddAttribute", "node-to-add-attrib ute", "newattr=\"new-value\"", next);
53 },
54
55 function testAddAttributeUnquotedValue(next)
56 {
57 InspectorTest.doAddAttribute("testAddAttributeUnquotedValue", "node- to-add-attribute-unquoted-value", "newattr=unquotedValue", next);
58 },
59 ]);
60 }
61
62 </script>
63 </head>
64
65 <body onload="runTest()">
66 <p>
67 Tests that user can mutate DOM by means of elements panel.
68 </p>
69
70 <div>
71 <div id="testSetAttribute">
72 <div foo="attribute value" id="node-to-set-attribute"></div>
73 </div>
74
75 <div id="testSetScriptableAttribute">
76 <div onclick="alert(1)" id="node-to-set-scriptable-attribute"></div>
77 </div>
78
79 <div id="testRemoveAttribute">
80 <div foo="attribute value" id="node-to-remove-attribute"></div>
81 </div>
82
83 <div id="testAddAttribute">
84 <div id="node-to-add-attribute"></div>
85 </div>
86
87 <div id="testAddAttributeUnquotedValue">
88 <div id="node-to-add-attribute-unquoted-value"></div>
89 </div>
90 </div>
91 </body>
92 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698