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

Side by Side Diff: LayoutTests/inspector/elements/styles/cancel-upon-invalid-property.html

Issue 1192033005: DevTools: [regression] entering invalid property value in the styles sidebar results in exception. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/styles/cancel-upon-invalid-property-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <style>
6 #inspected {
7 color: blue;
8 }
9 </style>
10 <script>
11
12 function test()
13 {
14 var treeElement;
15 InspectorTest.selectNodeAndWaitForStyles("inspected", editProperty);
16
17 function editProperty()
18 {
19 treeElement = InspectorTest.getMatchedStylePropertyTreeItem("color");
20 InspectorTest.dumpSelectedElementStyles(true, false, true);
21 treeElement.startEditing();
22 treeElement.nameElement.textContent = "color";
23 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r"));
24 treeElement.valueElement.textContent = "red";
25 InspectorTest.waitForStyleApplied(commitInvalidProperty);
26 treeElement.kickFreeFlowStyleEditForTest();
27 }
28
29 function commitInvalidProperty()
30 {
31 treeElement.valueElement.textContent = "red/*";
32 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Ent er"));
33 InspectorTest.waitForStyleApplied(invalidCommitted);
34 }
35
36 function invalidCommitted()
37 {
38 InspectorTest.waitForStyleApplied(dumpAndExit);
39 }
40
41 function dumpAndExit()
42 {
43 InspectorTest.dumpSelectedElementStyles(true, false, true);
44 InspectorTest.completeTest();
45 }
46 }
47
48 </script>
49 </head>
50
51 <body onload="runTest()">
52 <p>
53 Verifies that entering poor property value restores original text.
54 </p>
55
56 <div id="inspected">Text</div>
57
58 </body>
59 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/styles/cancel-upon-invalid-property-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698