From 782bddc8ac1f8ba51fb749b05522a57e206d37e3 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Tue, 2 Oct 2012 09:14:58 -0400 Subject: [PATCH 1/2] Revert previous set of diagnostics for bug 536603. --- layout/style/test/ccd-quirks.html | 63 ++++++++------------ layout/style/test/ccd-standards.html | 62 ++++++++----------- layout/style/test/test_css_cross_domain.html | 28 +-------- 3 files changed, 51 insertions(+), 102 deletions(-) diff --git a/layout/style/test/ccd-quirks.html b/layout/style/test/ccd-quirks.html index 43dea13d4ef..f12204a2d4b 100644 --- a/layout/style/test/ccd-quirks.html +++ b/layout/style/test/ccd-quirks.html @@ -61,45 +61,31 @@ p + p { left: 22px } - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -135,5 +121,4 @@ for (var i = 0; i < links.length; i++) {

- diff --git a/layout/style/test/ccd-standards.html b/layout/style/test/ccd-standards.html index 2e1ba72f13a..ae6f443a271 100644 --- a/layout/style/test/ccd-standards.html +++ b/layout/style/test/ccd-standards.html @@ -60,45 +60,31 @@ p + p { left: 22px } - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/layout/style/test/test_css_cross_domain.html b/layout/style/test/test_css_cross_domain.html index f71e817640f..055398dec68 100644 --- a/layout/style/test/test_css_cross_domain.html +++ b/layout/style/test/test_css_cross_domain.html @@ -79,18 +79,8 @@ /** 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"); @@ -98,22 +88,10 @@ function check_iframe(ifr) { } } -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(); }; From 230a3c567db27d1bf0eebb0c61b990d7ee910e9f Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Tue, 2 Oct 2012 09:50:19 -0400 Subject: [PATCH 2/2] Another round of diagnostics for bug 536603. --- layout/style/test/ccd.sjs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/layout/style/test/ccd.sjs b/layout/style/test/ccd.sjs index 058393e82ee..f66a151302c 100644 --- a/layout/style/test/ccd.sjs +++ b/layout/style/test/ccd.sjs @@ -61,13 +61,17 @@ function handleRequest(request, response) 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); } }