Merge mozilla-central to mozilla-inbound
authorEd Morley <emorley@mozilla.com>
Tue, 02 Oct 2012 16:55:54 +0100
changeset 109017 9fec17552df2b1b12b506e464768e2d3026e1cec
parent 109016 9a73d985e5e93d00336afd4023696ff063eecf12 (current diff)
parent 109000 345a2a8ccb18eebe27b650e7f760be1373b94e4b (diff)
child 109018 02f0c3cf55754a5ed530e42fbfbe98c1ef5b3bb4
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
milestone18.0a1
Merge mozilla-central to mozilla-inbound
--- a/layout/style/test/ccd-quirks.html
+++ b/layout/style/test/ccd-quirks.html
@@ -56,55 +56,41 @@ p + p { left: 22px }
 @import url("redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC2iq");
 @import url("redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC3iq");
 @import url("http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD1iq");
 @import url("http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD2iq");
 @import url("http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD3iq");
 </style>
 
 <!-- link directives -->
-<link rel="stylesheet" data-href="ccd.sjs?IA1lq">
-<link rel="stylesheet" data-href="ccd.sjs?IA2lq">
-<link rel="stylesheet" data-href="ccd.sjs?IA3lq">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/ccd.sjs?IB1lq">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/ccd.sjs?IB2lq">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/ccd.sjs?IB3lq">
-<link rel="stylesheet" data-href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?IC1lq">
-<link rel="stylesheet" data-href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?IC2lq">
-<link rel="stylesheet" data-href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?IC3lq">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/redirect.sjs?ccd.sjs?ID1lq">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/redirect.sjs?ccd.sjs?ID2lq">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/redirect.sjs?ccd.sjs?ID3lq">
-<link rel="stylesheet" data-href="ccd.sjs?JA1lq">
-<link rel="stylesheet" data-href="ccd.sjs?JA2lq">
-<link rel="stylesheet" data-href="ccd.sjs?JA3lq">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/ccd.sjs?JB1lq">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/ccd.sjs?JB2lq">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/ccd.sjs?JB3lq">
-<link rel="stylesheet" data-href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC1lq">
-<link rel="stylesheet" data-href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC2lq">
-<link rel="stylesheet" data-href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC3lq">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD1lq">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD2lq">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD3lq">
-<script>
-// attach onload and onerror handlers to every link tag, then activate
-// them.  see audit logic in test_css_cross_domain.html
-function setCompleted() {
-  this.dataset.completed = true;
-}
+<link rel="stylesheet" href="ccd.sjs?IA1lq">
+<link rel="stylesheet" href="ccd.sjs?IA2lq">
+<link rel="stylesheet" href="ccd.sjs?IA3lq">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/ccd.sjs?IB1lq">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/ccd.sjs?IB2lq">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/ccd.sjs?IB3lq">
+<link rel="stylesheet" href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?IC1lq">
+<link rel="stylesheet" href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?IC2lq">
+<link rel="stylesheet" href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?IC3lq">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/redirect.sjs?ccd.sjs?ID1lq">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/redirect.sjs?ccd.sjs?ID2lq">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/redirect.sjs?ccd.sjs?ID3lq">
+<link rel="stylesheet" href="ccd.sjs?JA1lq">
+<link rel="stylesheet" href="ccd.sjs?JA2lq">
+<link rel="stylesheet" href="ccd.sjs?JA3lq">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/ccd.sjs?JB1lq">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/ccd.sjs?JB2lq">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/ccd.sjs?JB3lq">
+<link rel="stylesheet" href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC1lq">
+<link rel="stylesheet" href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC2lq">
+<link rel="stylesheet" href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC3lq">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD1lq">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD2lq">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD3lq">
 
-var links = document.getElementsByTagName("link");
-for (var i = 0; i < links.length; i++) {
-  links[i].dataset.completed = false;
-  links[i].addEventListener("load", setCompleted);
-  links[i].addEventListener("error", setCompleted);
-  links[i].href = links[i].dataset.href;
-}
-</script>
 </head><body>
 <div></div>
 <div></div>
 <div><p id="IA1i"></p><p id="IA1l"></p></div>
 <div><p id="IA2i"></p><p id="IA2l"></p></div>
 <div><p id="IA3i"></p><p id="IA3l"></p></div>
 <div></div>
 <div><p id="IB1i"></p><p id="IB1l"></p></div>
@@ -130,10 +116,9 @@ for (var i = 0; i < links.length; i++) {
 <div></div>
 <div><p id="JC1i"></p><p id="JC1l"></p></div>
 <div><p id="JC2i"></p><p id="JC2l"></p></div>
 <div><p id="JC3i"></p><p id="JC3l"></p></div>
 <div></div>
 <div><p id="JD1i"></p><p id="JD1l"></p></div>
 <div><p id="JD2i"></p><p id="JD2l"></p></div>
 <div><p id="JD3i"></p><p id="JD3l"></p></div>
-
 </body></html>
--- a/layout/style/test/ccd-standards.html
+++ b/layout/style/test/ccd-standards.html
@@ -55,55 +55,41 @@ p + p { left: 22px }
 @import url("redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC2is");
 @import url("redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC3is");
 @import url("http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD1is");
 @import url("http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD2is");
 @import url("http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD3is");
 </style>
 
 <!-- link directives -->
-<link rel="stylesheet" data-href="ccd.sjs?IA1ls">
-<link rel="stylesheet" data-href="ccd.sjs?IA2ls">
-<link rel="stylesheet" data-href="ccd.sjs?IA3ls">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/ccd.sjs?IB1ls">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/ccd.sjs?IB2ls">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/ccd.sjs?IB3ls">
-<link rel="stylesheet" data-href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?IC1ls">
-<link rel="stylesheet" data-href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?IC2ls">
-<link rel="stylesheet" data-href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?IC3ls">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/redirect.sjs?ccd.sjs?ID1ls">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/redirect.sjs?ccd.sjs?ID2ls">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/redirect.sjs?ccd.sjs?ID3ls">
-<link rel="stylesheet" data-href="ccd.sjs?JA1ls">
-<link rel="stylesheet" data-href="ccd.sjs?JA2ls">
-<link rel="stylesheet" data-href="ccd.sjs?JA3ls">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/ccd.sjs?JB1ls">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/ccd.sjs?JB2ls">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/ccd.sjs?JB3ls">
-<link rel="stylesheet" data-href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC1ls">
-<link rel="stylesheet" data-href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC2ls">
-<link rel="stylesheet" data-href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC3ls">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD1ls">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD2ls">
-<link rel="stylesheet" data-href="http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD3ls">
-<script>
-// attach onload and onerror handlers to every link tag, then activate
-// them.  see audit logic in test_css_cross_domain.html
-function setCompleted() {
-  this.dataset.completed = true;
-}
+<link rel="stylesheet" href="ccd.sjs?IA1ls">
+<link rel="stylesheet" href="ccd.sjs?IA2ls">
+<link rel="stylesheet" href="ccd.sjs?IA3ls">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/ccd.sjs?IB1ls">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/ccd.sjs?IB2ls">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/ccd.sjs?IB3ls">
+<link rel="stylesheet" href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?IC1ls">
+<link rel="stylesheet" href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?IC2ls">
+<link rel="stylesheet" href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?IC3ls">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/redirect.sjs?ccd.sjs?ID1ls">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/redirect.sjs?ccd.sjs?ID2ls">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/redirect.sjs?ccd.sjs?ID3ls">
+<link rel="stylesheet" href="ccd.sjs?JA1ls">
+<link rel="stylesheet" href="ccd.sjs?JA2ls">
+<link rel="stylesheet" href="ccd.sjs?JA3ls">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/ccd.sjs?JB1ls">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/ccd.sjs?JB2ls">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/ccd.sjs?JB3ls">
+<link rel="stylesheet" href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC1ls">
+<link rel="stylesheet" href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC2ls">
+<link rel="stylesheet" href="redirect.sjs?http://example.org/tests/layout/style/test/ccd.sjs?JC3ls">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD1ls">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD2ls">
+<link rel="stylesheet" href="http://example.org/tests/layout/style/test/redirect.sjs?http://mochi.test:8888/tests/layout/style/test/ccd.sjs?JD3ls">
 
-var links = document.getElementsByTagName("link");
-for (var i = 0; i < links.length; i++) {
-  links[i].dataset.completed = false;
-  links[i].addEventListener("load", setCompleted);
-  links[i].addEventListener("error", setCompleted);
-  links[i].href = links[i].dataset.href;
-}
-</script>
 </head><body>
 <div></div>
 <div></div>
 <div><p id="IA1i"></p><p id="IA1l"></p></div>
 <div><p id="IA2i"></p><p id="IA2l"></p></div>
 <div><p id="IA3i"></p><p id="IA3l"></p></div>
 <div></div>
 <div><p id="IB1i"></p><p id="IB1l"></p></div>
--- a/layout/style/test/ccd.sjs
+++ b/layout/style/test/ccd.sjs
@@ -56,18 +56,22 @@ function handleRequest(request, response
 	response.write(selector + '{background-color:blue}\n');
     } else if (DEBUG_all_stub) {
 	// In this mode, every test chip for a case where the true test
 	// sheet would be honored, should turn red.
 	response.setHeader('Content-Type', 'text/css');
 	response.write(selector + '{}\n');
     } else {
 	// Normal operation.
+        let contentType = responseCSS ? 'text/css' : 'text/html';
+        let responseBody = (leader + selector +
+	                    '{background-color:' + color + '}' +
+		            trailer + '\n');
+        dump("TEST-INFO | ccd.sjs | " + request.queryString + " | " +
+             contentType + " | " + (httpError ? '500' : '200') + " | " +
+             responseBody);
 	if (httpError)
 	    response.setStatusLine(request.httpVersion, 500,
 				   "Internal Server Error");
-	response.setHeader('Content-Type',
-			   responseCSS ? 'text/css' : 'text/html');
-	response.write(leader + selector +
-		       '{background-color:' + color + '}' +
-		       trailer + '\n');
+        response.setHeader('Content-Type', contentType);
+	response.write(responseBody);
     }
 }
--- a/layout/style/test/test_css_cross_domain.html
+++ b/layout/style/test/test_css_cross_domain.html
@@ -74,48 +74,26 @@
 <iframe id="standards" src="ccd-standards.html"></iframe>
 </div>
 
 <script type="application/javascript">
 
 /** Test for Bug 524223 **/
 function check_iframe(ifr) {
     var doc = ifr.contentDocument;
-    var i;
-
-    // Check that all links have in fact either loaded or errored.
-    // Doesn't seem to be possible to do this for @import, but this is
-    // just a diagnostic, anyway.  See corresponding code in ccd-*.html.
-    var links = doc.getElementsByTagName("link");
-    for (i = 0; i < links.length; i++) {
-       ok(links[i].dataset.completed, ifr.id + " " + links[i].href + " loaded");
-    }
-
     var cases = doc.getElementsByTagName("p");
-    for (i = 0; i < cases.length; i++) {
+    for (var i = 0; i < cases.length; i++) {
 	var color = doc.defaultView.getComputedStyle(cases[i], "")
 	    .getPropertyValue("background-color");
 
 	is(color, "rgb(0, 255, 0)", ifr.id + " " + cases[i].id);
     }
 }
 
-var quirks = document.getElementById("quirks");
-var standards = document.getElementById("standards");
-var quirks_loaded = false;
-var standards_loaded = false;
-
 SimpleTest.waitForExplicitFinish();
-
-quirks.onload = function() { quirks_loaded = true; }
-standards.onload = function() { standards_loaded = true; }
-
 window.onload = function() {
-    ok(quirks_loaded, "quirks frame loaded");
-    ok(standards_loaded, "standards frame loaded");
-
-    check_iframe(quirks);
-    check_iframe(standards);
+    check_iframe(document.getElementById("quirks"));
+    check_iframe(document.getElementById("standards"));
     SimpleTest.finish();
 };
 </script>
 </body>
 </html>