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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/styles/cancel-upon-invalid-property-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/elements/styles/cancel-upon-invalid-property.html
diff --git a/LayoutTests/inspector/elements/styles/cancel-upon-invalid-property.html b/LayoutTests/inspector/elements/styles/cancel-upon-invalid-property.html
new file mode 100644
index 0000000000000000000000000000000000000000..4208a230e33a55720b16a54a15af2a7d316b2773
--- /dev/null
+++ b/LayoutTests/inspector/elements/styles/cancel-upon-invalid-property.html
@@ -0,0 +1,59 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/elements-test.js"></script>
+<style>
+#inspected {
+ color: blue;
+}
+</style>
+<script>
+
+function test()
+{
+ var treeElement;
+ InspectorTest.selectNodeAndWaitForStyles("inspected", editProperty);
+
+ function editProperty()
+ {
+ treeElement = InspectorTest.getMatchedStylePropertyTreeItem("color");
+ InspectorTest.dumpSelectedElementStyles(true, false, true);
+ treeElement.startEditing();
+ treeElement.nameElement.textContent = "color";
+ treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
+ treeElement.valueElement.textContent = "red";
+ InspectorTest.waitForStyleApplied(commitInvalidProperty);
+ treeElement.kickFreeFlowStyleEditForTest();
+ }
+
+ function commitInvalidProperty()
+ {
+ treeElement.valueElement.textContent = "red/*";
+ treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
+ InspectorTest.waitForStyleApplied(invalidCommitted);
+ }
+
+ function invalidCommitted()
+ {
+ InspectorTest.waitForStyleApplied(dumpAndExit);
+ }
+
+ function dumpAndExit()
+ {
+ InspectorTest.dumpSelectedElementStyles(true, false, true);
+ InspectorTest.completeTest();
+ }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Verifies that entering poor property value restores original text.
+</p>
+
+<div id="inspected">Text</div>
+
+</body>
+</html>
« 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