2011-02-07 Pavel Feldman <pfeldman@chromium.org>
[WebKit-https.git] / LayoutTests / inspector / 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 .unused {
6     color: green;
7 }
8 </style>
9 <script src="../http/tests/inspector/inspector-test2.js"></script>
10 <script src="audits-tests2.js"></script>
11
12 <!-- These scripts are needed to result in a violation of the max JS resource count from the same domain -->
13 <script src="resources/audits-script1.js"></script>
14 <link rel="stylesheet" href="resources/audits-style1.css" type="text/css">
15 <script src="resources/audits-script2.js"></script>
16 <script>
17 var test = function()
18 {
19     InspectorTest.reloadPage(step1);
20
21     function step1()
22     {
23         WebInspector.AuditRuleResult.resourceDomain = function() {
24             return "[domain]";
25         };
26
27         var launcherView = WebInspector.panels.audits._launcherView;
28         launcherView._selectAllClicked(true);
29         launcherView._auditPresentStateElement.checked = true;
30         launcherView._launchButtonClicked();
31
32         InspectorTest.runAfterPendingDispatches(step2);
33     }    
34
35     function step2()
36     {
37         InspectorTest.collectAuditResults();
38         InspectorTest.completeTest();
39     }
40 }
41 </script>
42 </script>
43 </head>
44
45 <body onload="runTest()">
46 Tests audit rules.
47 <style>
48 .violation { color: red; }
49 </style>
50 <link rel="stylesheet" href="resources/audits-style1.css" type="text/css">
51 <img src="foo1.jpg">
52 <img src="foo2.jpg" width=100>
53 <img src="foo3.jpg" style="position: absolute">
54
55 </body>
56 </html>