<html>
- <head>
- <title>User Stylesheet Test</title>
- <script type="text/javascript">
- if (window.layoutTestController) {
- layoutTestController.dumpAsText();
+<head>
+<title>User Stylesheet Test</title>
+<script type="text/javascript">
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
- // This won't work outside of DRT!
- if (window.location.hash == '') {
- layoutTestController.waitUntilDone();
- layoutTestController.setUserStyleSheetLocation("file:///tmp/LayoutTests/http/tests/security/resources/cssStyle.css");
- layoutTestController.setUserStyleSheetEnabled(true);
- location += '?#done';
- }
- }
+ // This won't work outside of DRT!
+ if (window.location.hash == '') {
+ layoutTestController.waitUntilDone();
+ layoutTestController.setUserStyleSheetLocation("file:///tmp/LayoutTests/http/tests/security/resources/cssStyle.css");
+ layoutTestController.setUserStyleSheetEnabled(true);
+ location += '?#done';
+ }
+ }
- function backgroundCheck() {
- var result = document.getElementById("result");
- var myBody = document.getElementById("myBody");
-
- var style = document.defaultView.getComputedStyle(myBody, null);
- var bgColor = style.getPropertyValue("background-color");
- if (bgColor[4] == 2) {
- result.innerHTML = "Test Passed: Local user stylesheet loaded.";
- } else {
- result.innerHTML = "Test Failed: Local user stylesheet not loaded into remote document.";
- }
+ function backgroundCheck() {
+ var result = document.getElementById("result");
+ var myBody = document.getElementById("myBody");
+
+ var style = document.defaultView.getComputedStyle(myBody, null);
+ var bgColor = style.getPropertyValue("background-color");
+ if (bgColor[4] == 2) {
+ result.innerHTML = "Test Passed: Local user stylesheet loaded.";
+ } else {
+ result.innerHTML = "Test Failed: Local user stylesheet not loaded into remote document.";
+ }
- if (window.layoutTestController) {
- layoutTestController.setUserStyleSheetEnabled(false);
- layoutTestController.notifyDone();
- }
-
- }
- </script>
- </head>
- <body id="myBody" onload="backgroundCheck()">
- <div id="other">
- This test is to see if a remote file can include a local user stylesheet.
- <br />
- To run this test manually you must set your user style sheet in your Safari preferences
- to LayoutTests/http/tests/security/resources/cssStyle.css
- <br/>
- If the background is yellow then the user stylesheet was loaded.
- </div>
- </br>
- <div id="result">
- Test not run correctly.
- </div>
- </body>
+ if (window.layoutTestController) {
+ layoutTestController.setUserStyleSheetEnabled(false);
+ layoutTestController.notifyDone();
+ }
+ }
+</script>
+</head>
+<body id="myBody" onload="backgroundCheck()">
+ <div id="other">
+ This test is to see if a remote file can include a local user stylesheet.
+ <br />
+ To run this test manually you must set your user style sheet in your Safari preferences
+ to LayoutTests/http/tests/security/resources/cssStyle.css
+ <br/>
+ If the background is yellow then the user stylesheet was loaded.
+ </div>
+ </br>
+ <div id="result">
+ Test not run correctly.
+ </div>
+</body>
</html>