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

Side by Side Diff: LayoutTests/inspector/elements/edit-style-attribute.html

Issue 206313004: DevTools: Rename WebInspector.DOMAgent into WebInspector.DOMModel (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 6 years, 9 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/elements-test.js"></script> 4 <script src="../../http/tests/inspector/elements-test.js"></script>
5 <script> 5 <script>
6 6
7 function testSetNewValue() 7 function testSetNewValue()
8 { 8 {
9 document.getElementById("node-set-new-value").style.setProperty("color", "bl ue"); 9 document.getElementById("node-set-new-value").style.setProperty("color", "bl ue");
10 } 10 }
(...skipping 13 matching lines...) Expand all
24 InspectorTest.runTestSuite([ 24 InspectorTest.runTestSuite([
25 function testSetUp(next) 25 function testSetUp(next)
26 { 26 {
27 InspectorTest.expandElementsTree(next); 27 InspectorTest.expandElementsTree(next);
28 }, 28 },
29 29
30 function testSetNewValue(next) 30 function testSetNewValue(next)
31 { 31 {
32 InspectorTest.evaluateInPage("testSetNewValue()"); 32 InspectorTest.evaluateInPage("testSetNewValue()");
33 33
34 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events. AttrModified, listener); 34 WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events. AttrModified, listener);
35 function listener(event) 35 function listener(event)
36 { 36 {
37 InspectorTest.addResult("WebInspector.DOMAgent.Events.AttrModifi ed should be issued"); 37 InspectorTest.addResult("WebInspector.DOMModel.Events.AttrModifi ed should be issued");
38 WebInspector.domAgent.removeEventListener(WebInspector.DOMAgent. Events.AttrModified, listener); 38 WebInspector.domModel.removeEventListener(WebInspector.DOMModel. Events.AttrModified, listener);
39 next(); 39 next();
40 } 40 }
41 }, 41 },
42 42
43 function testSetSameValue(next) 43 function testSetSameValue(next)
44 { 44 {
45 InspectorTest.evaluateInPage("testSetSameValue()"); 45 InspectorTest.evaluateInPage("testSetSameValue()");
46 46
47 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events. AttrModified, listener); 47 WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events. AttrModified, listener);
48 function listener(event) 48 function listener(event)
49 { 49 {
50 InspectorTest.addResult("WebInspector.DOMAgent.Events.AttrModifi ed should not be issued"); 50 InspectorTest.addResult("WebInspector.DOMModel.Events.AttrModifi ed should not be issued");
51 WebInspector.domAgent.removeEventListener(WebInspector.DOMAgent. Events.AttrModified, listener); 51 WebInspector.domModel.removeEventListener(WebInspector.DOMModel. Events.AttrModified, listener);
52 } 52 }
53 53
54 InspectorTest.addSniffer(WebInspector.DOMNode.prototype, "_setAttrib utesPayload", callback); 54 InspectorTest.addSniffer(WebInspector.DOMNode.prototype, "_setAttrib utesPayload", callback);
55 function callback() 55 function callback()
56 { 56 {
57 InspectorTest.addResult("WebInspector.DOMNode.prototype._setAttr ibutesPayload should be called"); 57 InspectorTest.addResult("WebInspector.DOMNode.prototype._setAttr ibutesPayload should be called");
58 WebInspector.domAgent.removeEventListener(WebInspector.DOMAgent. Events.AttrModified, listener); 58 WebInspector.domModel.removeEventListener(WebInspector.DOMModel. Events.AttrModified, listener);
59 next(); 59 next();
60 } 60 }
61 } 61 }
62 ]); 62 ]);
63 } 63 }
64 64
65 </script> 65 </script>
66 </head> 66 </head>
67 67
68 <body onload="runTest()"> 68 <body onload="runTest()">
69 <p> 69 <p>
70 Tests that style modification generates attribute updated event only when attrib ute is actually changed. 70 Tests that style modification generates attribute updated event only when attrib ute is actually changed.
71 </p> 71 </p>
72 72
73 <div id="container"> 73 <div id="container">
74 <div id="node-set-new-value" style="color:red"></div> 74 <div id="node-set-new-value" style="color:red"></div>
75 <div id="node-set-same-value" style="color:red"></div> 75 <div id="node-set-same-value" style="color:red"></div>
76 </div> 76 </div>
77 </body> 77 </body>
78 </html> 78 </html>
OLDNEW
« no previous file with comments | « LayoutTests/inspector/elements/dom-search-crash.html ('k') | LayoutTests/inspector/elements/edit-style-attribute-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698