LayoutTests:
[WebKit-https.git] / LayoutTests / fast / loader / local-CSS-from-local.html
1 <html>
2 <head>
3     <link rel="stylesheet" type="text/css" href="file:///tmp/LayoutTests/http/tests/security/resources/cssStyle.css" />
4     <script>
5         if (window.layoutTestController) {
6             layoutTestController.dumpAsText();
7         }
8     
9         function backgroundCheck() {
10             var result = document.getElementById("result");
11             var myBody = document.getElementById("myBody");
12             var style = document.defaultView.getComputedStyle(myBody, null);
13             var bgColor = style.getPropertyValue("background-color");
14             if (bgColor[4] == 2) {
15                 result.innerHTML = "Test Passed.";
16             } else {
17                 result.innerHTML = "Test Failed: Local CSS not remotely loaded.";
18             }
19         }
20     </script>
21 </head>
22 <body id="myBody" onload="backgroundCheck()">
23     <div id="div0">
24         This test is to see if a local file can include a local CSS style.
25         <br/>
26         If the background is yellow then the CSS was loaded.
27     </div>
28     </br>
29     <div id="result">
30         Test not run correctly.
31     </div>
32 </body>
33 </html>