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

Unified Diff: LayoutTests/http/tests/inspector/elements-test.js

Issue 177963004: DevTools: Split creating inspector stylesheet and adding a new rule into stylesheet in protocol. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed test Created 6 years, 10 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
Index: LayoutTests/http/tests/inspector/elements-test.js
diff --git a/LayoutTests/http/tests/inspector/elements-test.js b/LayoutTests/http/tests/inspector/elements-test.js
index a94515ac8afa25a70061c62795453118d370f2f8..601dc04c0a28b1399e0a7face55a7d36116cfa92 100644
--- a/LayoutTests/http/tests/inspector/elements-test.js
+++ b/LayoutTests/http/tests/inspector/elements-test.js
@@ -669,6 +669,17 @@ InspectorTest.matchingSelectors = function(rule)
return "[" + selectors.join(", ") + "]";
}
+InspectorTest.addNewRule = function(selector, callback)
+{
+ // Click "Add new rule".
+ document.getElementById("add-style-button-test-id").click();
+ var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2];
+ if (typeof selector === "string")
+ section._selectorElement.textContent = selector;
+ section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
+ InspectorTest.addSniffer(WebInspector.BlankStylePropertiesSection.prototype, "makeNormal", callback);
+}
+
};
function dumpInspectorHighlightRects()

Powered by Google App Engine
This is Rietveld 408576698