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

Unified Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-2/add-import-rule.html

Issue 2319533004: Removed m_isSettingStyleSheetText from InspectorCSSAgent. (Closed)
Patch Set: Created 4 years, 3 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 | third_party/WebKit/LayoutTests/inspector/elements/styles-2/add-import-rule-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/elements/styles-2/add-import-rule.html
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/styles-2/add-import-rule.html b/third_party/WebKit/LayoutTests/inspector/elements/styles-2/add-import-rule.html
new file mode 100644
index 0000000000000000000000000000000000000000..ebd85185ecfe0f9acf5b878d1699fb4c6b903e9d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/elements/styles-2/add-import-rule.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/elements-test.js"></script>
+<style>span { color: red }</style>
+<script>
+function test() {
+
+var nodeId;
+var sheetId;
+
+InspectorTest.selectNodeAndWaitForStyles("styled-span", nodeSelected);
+
+function nodeSelected(node) {
+ nodeId = node.id;
+ InspectorTest.cssModel.matchedStylesPromise(nodeId).then(matchedStylesBefore);
+}
+
+function matchedStylesBefore(matchedResult) {
+ sheetId = matchedResult.nodeStyles()[1].styleSheetId;
+ InspectorTest.addResult("\n== Matched rules before @import added ==\n");
+ InspectorTest.dumpSelectedElementStyles(true);
+ InspectorTest.CSSAgent.setStyleSheetText(sheetId, "@import 'data:text/css,span{color:green}';").then(sheetTextSet);
+}
+
+function sheetTextSet() {
+ InspectorTest.selectNodeAndWaitForStyles("styled-span", matchedStylesAfter);
+}
+
+function matchedStylesAfter() {
+ InspectorTest.addResult("\n== Matched rules after @import added ==\n");
+ InspectorTest.dumpSelectedElementStyles(true);
+ InspectorTest.completeTest();
+}
+
+}
+</script>
+<body onload="runTest()">
+<span id="styled-span"></span>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/styles-2/add-import-rule-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698