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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-3/styles-add-blank-property.html

Issue 2045603002: Handle the "key" field as opposed to keyIdentifier field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove initialization of the view Created 4 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
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 test() 7 function test()
8 { 8 {
9 InspectorTest.selectNodeAndWaitForStyles("inspected", addAndIncrementFirstPr operty); 9 InspectorTest.selectNodeAndWaitForStyles("inspected", addAndIncrementFirstPr operty);
10 10
11 var treeElement; 11 var treeElement;
12 var section; 12 var section;
13 13
14 function addAndIncrementFirstProperty() 14 function addAndIncrementFirstProperty()
15 { 15 {
16 InspectorTest.addResult("Before append:"); 16 InspectorTest.addResult("Before append:");
17 InspectorTest.dumpSelectedElementStyles(true); 17 InspectorTest.dumpSelectedElementStyles(true);
18 section = InspectorTest.inlineStyleSection(); 18 section = InspectorTest.inlineStyleSection();
19 19
20 // Create and increment. 20 // Create and increment.
21 treeElement = section.addNewBlankProperty(0); 21 treeElement = section.addNewBlankProperty(0);
22 treeElement.startEditing(); 22 treeElement.startEditing();
23 treeElement.nameElement.textContent = "margin-left"; 23 treeElement.nameElement.textContent = "margin-left";
24 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r")); 24 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r"));
25 25
26 treeElement.valueElement.textContent = "1px"; 26 treeElement.valueElement.textContent = "1px";
27 treeElement.valueElement.firstChild.select(); 27 treeElement.valueElement.firstChild.select();
28 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Up" )); 28 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Arr owUp"));
29 InspectorTest.waitForStyleApplied(incrementProperty); 29 InspectorTest.waitForStyleApplied(incrementProperty);
30 } 30 }
31 31
32 function incrementProperty() 32 function incrementProperty()
33 { 33 {
34 // Increment again. 34 // Increment again.
35 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Up" )); 35 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Arr owUp"));
36 InspectorTest.waitForStyleApplied(commitProperty); 36 InspectorTest.waitForStyleApplied(commitProperty);
37 } 37 }
38 38
39 function commitProperty() 39 function commitProperty()
40 { 40 {
41 // Commit. 41 // Commit.
42 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r")); 42 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r"));
43 reloadStyles(addAndChangeLastCompoundProperty); 43 reloadStyles(addAndChangeLastCompoundProperty);
44 } 44 }
45 45
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 <body onload="runTest()"> 102 <body onload="runTest()">
103 <p> 103 <p>
104 Tests that adding a new blank property works. 104 Tests that adding a new blank property works.
105 </p> 105 </p>
106 106
107 <div id="inspected" style="font-size: 12px">Text</div> 107 <div id="inspected" style="font-size: 12px">Text</div>
108 <div id="other"></div> 108 <div id="other"></div>
109 109
110 </body> 110 </body>
111 </html> 111 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698