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

Side by Side Diff: LayoutTests/inspector-protocol/css/css-protocol-test.js

Issue 311123002: Revert "DevTools: matched styles respect :visited/:link pseudo classes" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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-protocol/css/css-shadow-host-rule.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function initialize_cssTest() 1 function initialize_cssTest()
2 { 2 {
3 3
4 InspectorTest.dumpStyleSheetText = function(styleSheetId, callback) 4 InspectorTest.dumpStyleSheetText = function(styleSheetId, callback)
5 { 5 {
6 InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: styl eSheetId }, onStyleSheetText); 6 InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: styl eSheetId }, onStyleSheetText);
7 function onStyleSheetText(result) 7 function onStyleSheetText(result)
8 { 8 {
9 InspectorTest.log("==== Style sheet text ===="); 9 InspectorTest.log("==== Style sheet text ====");
10 InspectorTest.log(result.text); 10 InspectorTest.log(result.text);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 log(4, propertyLine); 113 log(4, propertyLine);
114 } 114 }
115 log(0, "}"); 115 log(0, "}");
116 }; 116 };
117 117
118 InspectorTest.displayName = function(url) 118 InspectorTest.displayName = function(url)
119 { 119 {
120 return url.substr(url.lastIndexOf("/") + 1); 120 return url.substr(url.lastIndexOf("/") + 1);
121 }; 121 };
122 122
123 InspectorTest.loadAndDumpMatchingRulesForNode = function(nodeId, callback) 123 InspectorTest.loadAndDumpMatchingRules = function(nodeId, callback)
124 { 124 {
125 InspectorTest.sendCommandOrDie("CSS.getMatchedStylesForNode", { "nodeId": no deId }, matchingRulesLoaded); 125 InspectorTest.requestNodeId(nodeId, nodeIdLoaded);
126
127 function nodeIdLoaded(nodeId)
128 {
129 InspectorTest.sendCommandOrDie("CSS.getMatchedStylesForNode", { "nodeId" : nodeId }, matchingRulesLoaded);
130 }
126 131
127 function matchingRulesLoaded(result) 132 function matchingRulesLoaded(result)
128 { 133 {
129 InspectorTest.log("Dumping matched rules: "); 134 InspectorTest.log("Dumping matched rules: ");
130 var ruleMatches = result.matchedCSSRules; 135 var ruleMatches = result.matchedCSSRules;
131 for (var i = 0; i < ruleMatches.length; ++i) { 136 for (var i = 0; i < ruleMatches.length; ++i) {
132 var ruleMatch = ruleMatches[i]; 137 var ruleMatch = ruleMatches[i];
133 var origin = ruleMatch.rule.origin; 138 var origin = ruleMatch.rule.origin;
134 if (origin !== "inspector" && origin !== "regular") 139 if (origin !== "inspector" && origin !== "regular")
135 continue; 140 continue;
136 InspectorTest.dumpRuleMatch(ruleMatch); 141 InspectorTest.dumpRuleMatch(ruleMatch);
137 } 142 }
138 callback(); 143 callback();
139 } 144 }
140 } 145 }
141 146
142 InspectorTest.loadAndDumpMatchingRules = function(selector, callback)
143 {
144 InspectorTest.requestNodeId(selector, nodeIdLoaded);
145
146 function nodeIdLoaded(nodeId)
147 {
148 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback);
149 }
150 }
151
152 } 147 }
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/css/css-shadow-host-rule.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698