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

Side by Side Diff: LayoutTests/inspector-protocol/css/css-visited-link-matched-styles.html

Issue 228673002: DevTools: matched styles respect :visited/:link pseudo classes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
4 <script type="text/javascript" src="css-protocol-test.js"></script>
5 <script type="text/javascript">
6 function test()
apavlov 2014/04/08 14:19:46 we might want to check this stuff for shadow DOM a
lushnikov 2014/04/08 15:28:32 Done.
7 {
8 InspectorTest.sendCommandOrDie("CSS.enable", {}, onCSSEnabled);
9
10 function onCSSEnabled()
11 {
12 InspectorTest.log("==== Styles for unvisited link ====");
13 InspectorTest.loadAndDumpMatchingRules("#redlink", onUnvisitedLinkDumped );
14 }
15
16 function onUnvisitedLinkDumped()
17 {
18 InspectorTest.requestNodeId("#redlink", onNodeReceived);
19 }
20
21 function onNodeReceived(nodeId)
22 {
23 InspectorTest.sendCommandOrDie("CSS.forcePseudoState", {
24 nodeId: nodeId,
25 forcedPseudoClasses: [ "visited" ]
26 }, onVisitedForced.bind(null, nodeId));
27 }
28
29 function onVisitedForced(nodeId)
30 {
31 InspectorTest.log("==== Styles for visited link ====");
32 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, InspectorTest.comp leteTest.bind(InspectorTest));
33 }
34 }
35 </script>
36 <style>
37 a:visited {
38 color: red;
39 }
40 a:link {
41 color: blue;
42 }
43
44 a {
45 color: gray;
46 }
47 </style>
48 </head>
49 <body onload="runTest();">
50 <a id="redlink" href="definitely-unvisited-link-address-1989-42.html">This i s visited link</a>
51 </body>
52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698