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