1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
7 /* This is a comment to use some space before the unused rule */
15 x:before { color: black }
16 x:nth-child(1):hover:after { color: black }
17 x:after { color: black }
18 x:hover { color: black }
19 x:first-letter { color: black }
20 x:nth-child(2n + 1) { color: black }
22 /* These rules should NOT be reported as unused */
24 a:visited { text-decoration: none }
26 img::before { color: red }
27 img:after { color: red }
29 img:hover { border: 1px solid black }
30 img:focus { border: 1px solid black }
31 img:active { border: 1px solid black }
33 span:first-letter { color: red }
35 img:nth-child(2n) { border: 1px solid blue }
36 img:nth-child(2n + 1) { border: 1px solid green }
37 img:nth-child(1):hover:after { border: 1px solid cyan }
44 <script src="../../http/tests/inspector/inspector-test.js"></script>
45 <script src="audits-test.js"></script>
47 <!-- These scripts are needed to result in a violation of the max JS resource count from the same domain -->
48 <script src="resources/audits-script1.js"></script>
49 <link rel="stylesheet" href="resources/audits-style1.css" type="text/css">
50 <script src="resources/audits-script2.js"></script>
54 WebInspector.showPanel("audits");
55 InspectorTest.reloadPage(step1);
59 WebInspector.AuditRuleResult.resourceDomain = function() {
63 InspectorTest.launchAllAudits(false, step2);
68 InspectorTest.collectAuditResults();
69 InspectorTest.completeTest();
75 <body onload="runTest()">
76 <p>Tests audit rules.</p>
78 .violation { color: red; -webkit-border-radius: 3px; }
80 <link rel="stylesheet" href="resources/audits-style1.css" type="text/css">
82 <img src="foo2.jpg" width=100>
83 <img src="foo3.jpg" style="position: absolute">
84 <img src="foo4.jpg" style="width: 16px; height: 16px">