OLD | NEW |
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.runTestSuite([ | 9 InspectorTest.runTestSuite([ |
10 function init(next) | 10 function init(next) |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 treeElement = section.addNewBlankProperty(0); | 63 treeElement = section.addNewBlankProperty(0); |
64 treeElement.startEditing(); | 64 treeElement.startEditing(); |
65 treeElement.nameElement.textContent = "border-color"; | 65 treeElement.nameElement.textContent = "border-color"; |
66 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("
Enter")); | 66 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("
Enter")); |
67 treeElement.valueElement.textContent = "hsl(120, 100%, 25%)"; | 67 treeElement.valueElement.textContent = "hsl(120, 100%, 25%)"; |
68 treeElement.kickFreeFlowStyleEditForTest(); | 68 treeElement.kickFreeFlowStyleEditForTest(); |
69 InspectorTest.waitForStyleApplied(kicked); | 69 InspectorTest.waitForStyleApplied(kicked); |
70 | 70 |
71 function kicked() | 71 function kicked() |
72 { | 72 { |
73 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEv
ent("U+0009", false, false, true)); | 73 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEv
ent("Tab", false, false, true)); |
74 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEve
nt("U+0009")); | 74 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEve
nt("Tab")); |
75 InspectorTest.addResult(treeElement.valueElement.textContent); | 75 InspectorTest.addResult(treeElement.valueElement.textContent); |
76 next(); | 76 next(); |
77 } | 77 } |
78 } | 78 } |
79 ]); | 79 ]); |
80 | 80 |
81 function setFormat(newFormat, callback) | 81 function setFormat(newFormat, callback) |
82 { | 82 { |
83 WebInspector.settingForTest("colorFormat").set(newFormat); | 83 WebInspector.settingForTest("colorFormat").set(newFormat); |
84 WebInspector.panels.elements.sidebarPanes.styles.doUpdate().then(callbac
k); | 84 WebInspector.panels.elements.sidebarPanes.styles.doUpdate().then(callbac
k); |
85 } | 85 } |
86 | 86 |
87 function startEditingAndDumpValue(format, propertyName, next) | 87 function startEditingAndDumpValue(format, propertyName, next) |
88 { | 88 { |
89 setFormat(format, onFormatSet); | 89 setFormat(format, onFormatSet); |
90 | 90 |
91 function onFormatSet() | 91 function onFormatSet() |
92 { | 92 { |
93 var treeElement = InspectorTest.getElementStylePropertyTreeItem(prop
ertyName); | 93 var treeElement = InspectorTest.getElementStylePropertyTreeItem(prop
ertyName); |
94 treeElement.startEditing(treeElement.valueElement); | 94 treeElement.startEditing(treeElement.valueElement); |
95 InspectorTest.addResult(treeElement.valueElement.textContent); | 95 InspectorTest.addResult(treeElement.valueElement.textContent); |
96 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent(
"U+001B")); | 96 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent(
"Escape")); |
97 next(); | 97 next(); |
98 } | 98 } |
99 } | 99 } |
100 } | 100 } |
101 | 101 |
102 </script> | 102 </script> |
103 </head> | 103 </head> |
104 | 104 |
105 <body onload="runTest()"> | 105 <body onload="runTest()"> |
106 <p> | 106 <p> |
107 Tests that property value being edited uses the user-specified color format. | 107 Tests that property value being edited uses the user-specified color format. |
108 </p> | 108 </p> |
109 | 109 |
110 <div id="inspected1" style="border: 1px solid red">inspected1</div> | 110 <div id="inspected1" style="border: 1px solid red">inspected1</div> |
111 <div id="inspected2" style="color: #ffffee">inspected2</div> | 111 <div id="inspected2" style="color: #ffffee">inspected2</div> |
112 | 112 |
113 </body> | 113 </body> |
114 </html> | 114 </html> |
OLD | NEW |