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

Unified Diff: LayoutTests/inspector/elements/styles/styles-disable-property-after-selector-edit.html

Issue 692073003: DevTools: [SSP] update style rules of SectionPropertyTreeElements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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
Index: LayoutTests/inspector/elements/styles/styles-disable-property-after-selector-edit.html
diff --git a/LayoutTests/inspector/elements/styles/styles-disable-property-after-selector-edit.html b/LayoutTests/inspector/elements/styles/styles-disable-property-after-selector-edit.html
new file mode 100644
index 0000000000000000000000000000000000000000..553eb2b68402c205638ccf8bc35ede80d722d5fb
--- /dev/null
+++ b/LayoutTests/inspector/elements/styles/styles-disable-property-after-selector-edit.html
@@ -0,0 +1,55 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/elements-test.js"></script>
+<script>
+
+function test()
+{
+ InspectorTest.runTestSuite([
+ function selectInitialNode(next)
+ {
+ InspectorTest.selectNodeAndWaitForStyles("inspected", next);
+ },
+
+ function editSelector(next)
+ {
+ var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2];
+ section.startEditingSelector();
+ section._selectorElement.textContent = "#inspected, .INSERTED-OTHER-SELECTOR";
+ InspectorTest.waitForSelectorCommitted(next);
+ section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
+ },
+
+ function testDisableProperty(next)
+ {
+ var treeItem = InspectorTest.getMatchedStylePropertyTreeItem("color");
+ InspectorTest.waitForStyleApplied(onPropertyDisabled);
+ treeItem.toggleEnabled({ target: { checked: false }, consume: function() { } });
+
+ function onPropertyDisabled()
+ {
+ InspectorTest.addResult("\n\n#### AFTER PROPERTY DISABLED ####\n\n");
+ InspectorTest.dumpSelectedElementStyles(true, false, true);
+ next();
+ }
+ }
+ ]);
+}
+</script>
+<style>
+#inspected {
+ color: red;
+}
+</style>
+</head>
+
+<body onload="runTest()">
+<p>
+Verifies that sequence of setting selector and disabling property works.
+</p>
+
+<div id="inspected">Red text here.</div>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698