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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-1/edit-inspector-stylesheet.html

Issue 2261933002: DevTools: Use JS symbols instead of strings for eligible events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 src="../../../http/tests/inspector/debugger-test.js"></script> 5 <script src="../../../http/tests/inspector/debugger-test.js"></script>
6 <script> 6 <script>
7 7
8 function test() 8 function test()
9 { 9 {
10 InspectorTest.selectNodeAndWaitForStyles("inspected", onStylesSelected); 10 InspectorTest.selectNodeAndWaitForStyles("inspected", onStylesSelected);
11 11
12 function onStylesSelected(node) 12 function onStylesSelected(node)
13 { 13 {
14 WebInspector.workspace.addEventListener(WebInspector.Workspace.Events.Wo rkingCopyCommitted, onWorkingCopyCommitted); 14 WebInspector.workspace.addEventListener(WebInspector.Workspace.Events.Wo rkingCopyCommitted, onWorkingCopyCommitted);
15 InspectorTest.addNewRule("#inspected", new Function()); 15 InspectorTest.addNewRule("#inspected", new Function());
16 } 16 }
17 17
18 function onWorkingCopyCommitted(event) 18 function onWorkingCopyCommitted(event)
19 { 19 {
20 WebInspector.workspace.removeEventListener(WebInspector.UISourceCode.Eve nts.WorkingCopyCommitted, onWorkingCopyCommitted); 20 WebInspector.workspace.removeEventListener(WebInspector.Workspace.Events .WorkingCopyCommitted, onWorkingCopyCommitted);
21 var uiSourceCode = event.data.uiSourceCode; 21 var uiSourceCode = event.data.uiSourceCode;
22 InspectorTest.addResult("Inspector stylesheet URL: " + uiSourceCode.disp layName()); 22 InspectorTest.addResult("Inspector stylesheet URL: " + uiSourceCode.disp layName());
23 uiSourceCode.requestContent().then(printContent(onContent)) 23 uiSourceCode.requestContent().then(printContent(onContent))
24 24
25 function onContent() 25 function onContent()
26 { 26 {
27 InspectorTest.addResult("\nSetting new content"); 27 InspectorTest.addResult("\nSetting new content");
28 uiSourceCode.setWorkingCopy("#inspected { background-color: green; } "); 28 uiSourceCode.setWorkingCopy("#inspected { background-color: green; } ");
29 uiSourceCode.commitWorkingCopy(); 29 uiSourceCode.commitWorkingCopy();
30 onUpdatedWorkingCopy(uiSourceCode); 30 onUpdatedWorkingCopy(uiSourceCode);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 <body onload="runTest()"> 64 <body onload="runTest()">
65 <p> 65 <p>
66 Tests that adding a new rule creates inspector stylesheet resource and allows it s live editing. 66 Tests that adding a new rule creates inspector stylesheet resource and allows it s live editing.
67 </p> 67 </p>
68 68
69 <div id="inspected">Text</div> 69 <div id="inspected">Text</div>
70 70
71 </body> 71 </body>
72 </html> 72 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698