|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=524223 --> |
|
4 <head> |
|
5 <title>Test cross-domain CSS loading</title> |
|
6 <script type="application/javascript" |
|
7 src="/tests/SimpleTest/SimpleTest.js"></script> |
|
8 <link rel="stylesheet" type="text/css" |
|
9 href="/tests/SimpleTest/test.css"/> |
|
10 <style type="text/css"> |
|
11 hr { border: none; clear: both } |
|
12 .column { |
|
13 margin: 10px; |
|
14 float: left; |
|
15 } |
|
16 iframe { |
|
17 width: 40px; |
|
18 height: 680px; |
|
19 border: none; |
|
20 margin: 0; |
|
21 padding: 0; |
|
22 } |
|
23 h2 { font-weight: normal; padding: 0 } |
|
24 ol, h2 { font-size: 13px; line-height: 20px; } |
|
25 ol { padding-left: 1em; |
|
26 list-style-type: upper-roman } |
|
27 ol ol { list-style-type: upper-alpha } |
|
28 ol ol ol { list-style-type: decimal } |
|
29 </style> |
|
30 </head> |
|
31 <body> |
|
32 <a target="_blank" |
|
33 href="https://bugzilla.mozilla.org/show_bug.cgi?id=524223">Mozilla |
|
34 Bug 524223</a> |
|
35 |
|
36 <hr/> |
|
37 |
|
38 <div class="column"> |
|
39 <h2> </h2> |
|
40 <ol><li>text/css<ol><li>same origin<ol><li>valid</li> |
|
41 <li>malformed</li> |
|
42 <li>http error</li></ol></li> |
|
43 <li>cross origin<ol><li>valid</li> |
|
44 <li>malformed</li> |
|
45 <li>http error</li></ol></li> |
|
46 <li>same to cross<ol><li>valid</li> |
|
47 <li>malformed</li> |
|
48 <li>http error</li></ol></li> |
|
49 <li>cross to same<ol><li>valid</li> |
|
50 <li>malformed</li> |
|
51 <li>http error</li></ol></li></ol></li> |
|
52 <li>text/html<ol><li>same origin<ol><li>valid</li> |
|
53 <li>malformed</li> |
|
54 <li>http error</li></ol></li> |
|
55 <li>cross origin<ol><li>valid</li> |
|
56 <li>malformed</li> |
|
57 <li>http error</li></ol></li> |
|
58 <li>same to cross<ol><li>valid</li> |
|
59 <li>malformed</li> |
|
60 <li>http error</li></ol></li> |
|
61 <li>cross to same<ol><li>valid</li> |
|
62 <li>malformed</li> |
|
63 <li>http error</li></ol></li></ol></li> |
|
64 </ol> |
|
65 </div> |
|
66 |
|
67 <div class="column"> |
|
68 <h2>Quirks</h2> |
|
69 <iframe id="quirks" src="ccd-quirks.html"></iframe> |
|
70 </div> |
|
71 |
|
72 <div class="column"> |
|
73 <h2>Standards</h2> |
|
74 <iframe id="standards" src="ccd-standards.html"></iframe> |
|
75 </div> |
|
76 |
|
77 <script type="application/javascript"> |
|
78 |
|
79 /** Test for Bug 524223 **/ |
|
80 function check_iframe(ifr) { |
|
81 var doc = ifr.contentDocument; |
|
82 var cases = doc.getElementsByTagName("p"); |
|
83 for (var i = 0; i < cases.length; i++) { |
|
84 var color = doc.defaultView.getComputedStyle(cases[i], "") |
|
85 .getPropertyValue("background-color"); |
|
86 |
|
87 is(color, "rgb(0, 255, 0)", ifr.id + " " + cases[i].id); |
|
88 } |
|
89 } |
|
90 |
|
91 SimpleTest.waitForExplicitFinish(); |
|
92 window.onload = function() { |
|
93 check_iframe(document.getElementById("quirks")); |
|
94 check_iframe(document.getElementById("standards")); |
|
95 SimpleTest.finish(); |
|
96 }; |
|
97 </script> |
|
98 </body> |
|
99 </html> |