Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: LayoutTests/http/tests/security/local-user-CSS-from-remote.html

Issue 66383005: Remove the concept of user stylesheets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix WebFrameCSSCallbackTest tests Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <title>User Stylesheet Test</title>
4 <script type="text/javascript">
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7
8 // This won't work outside of DRT!
9 if (window.location.hash == '') {
10 testRunner.waitUntilDone();
11 var stylesheetLocation = testRunner.pathToLocalResource("file:///tmp /LayoutTests/http/tests/security/resources/cssStyle.css");
12 testRunner.setUserStyleSheetLocation(stylesheetLocation);
13 testRunner.setUserStyleSheetEnabled(true);
14 location += '?#done';
15 }
16 }
17
18 function backgroundCheck() {
19 var result = document.getElementById("result");
20 var myBody = document.getElementById("myBody");
21
22 var style = document.defaultView.getComputedStyle(myBody, null);
23 var bgColor = style.getPropertyValue("background-color");
24 if (bgColor[4] == 2) {
25 result.innerHTML = "Test Passed: Local user stylesheet loaded.";
26 } else {
27 result.innerHTML = "Test Failed: Local user stylesheet not loaded in to remote document.";
28 }
29
30 if (window.testRunner) {
31 testRunner.setUserStyleSheetEnabled(false);
32 testRunner.notifyDone();
33 }
34 }
35 </script>
36 </head>
37 <body id="myBody" onload="backgroundCheck()">
38 <div id="other">
39 This test is to see if a remote file can include a local user stylesheet .
40 <br />
41 To run this test manually you must set your user style sheet in your Saf ari preferences
42 to LayoutTests/http/tests/security/resources/cssStyle.css
43 <br/>
44 If the background is yellow then the user stylesheet was loaded.
45 </div>
46 </br>
47 <div id="result">
48 Test not run correctly.
49 </div>
50 </body>
51 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698