Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / audits / audits-panel-functional.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <head>
4 <style>
5 @media all {
6
7 /* This is a comment to use some space before the unused rule */
8
9 .unused {
10     color: green;
11     -webkit-opacity: 1;
12     opacity: 1;
13 }
14
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 }
21
22 /* These rules should NOT be reported as unused */
23
24 a:visited { text-decoration: none }
25
26 img::before { color: red }
27 img:after { color: red }
28
29 img:hover { border: 1px solid black }
30 img:focus { border: 1px solid black }
31 img:active { border: 1px solid black }
32
33 span:first-letter { color: red }
34
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 }
38
39 }
40 </style>
41 <script>
42 JSON = {};
43 </script>
44 <script src="../../http/tests/inspector/inspector-test.js"></script>
45 <script src="audits-test.js"></script>
46
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>
51 <script>
52 var test = function()
53 {
54     WebInspector.showPanel("audits");
55     InspectorTest.reloadPage(step1);
56
57     function step1()
58     {
59         WebInspector.AuditRuleResult.resourceDomain = function() {
60             return "[domain]";
61         };
62
63         InspectorTest.launchAllAudits(false, step2);
64     }
65
66     function step2()
67     {
68         InspectorTest.collectAuditResults();
69         InspectorTest.completeTest();
70     }
71 }
72 </script>
73 </head>
74
75 <body onload="runTest()">
76 <p>Tests audit rules.</p>
77 <style>
78 .violation { color: red; -webkit-border-radius: 3px; }
79 </style>
80 <link rel="stylesheet" href="resources/audits-style1.css" type="text/css">
81 <img src="foo1.jpg">
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">
85 <span>Text</span>
86 <a>Link</a>
87
88 </body>
89 </html>