X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=Source%2FWebInspectorUI%2FTools%2FPrettyPrinting%2Findex.html;h=d4e202076e34775b3f6daa0cf86c16bb3f5a5285;hp=4002852354f680c431e65f711f4809882ede4be8;hb=7f84e6ae74ba4185a9fe6c1a19c1ef64ee53b178;hpb=0d4d345a18aed7a9bad93ab0f1b924cbb64c3b0d;ds=sidebyside diff --git a/Source/WebInspectorUI/Tools/PrettyPrinting/index.html b/Source/WebInspectorUI/Tools/PrettyPrinting/index.html index 4002852354f6..d4e202076e34 100644 --- a/Source/WebInspectorUI/Tools/PrettyPrinting/index.html +++ b/Source/WebInspectorUI/Tools/PrettyPrinting/index.html @@ -163,13 +163,11 @@ // Button helpers. var buttons = ["mode", "populate", "run-tests", "clear", "select-output", "run-again"]; function disableButtons() { - console.log("disableButtons"); buttons.forEach(function(id) { document.getElementById(id).disabled = true; }); } function enableButtons() { - console.log("enableButtons"); buttons.forEach(function(id) { document.getElementById(id).disabled = false; }); @@ -243,7 +241,12 @@ ]); } function runCSSTests(callback) { - _runTests(callback, []); + _runTests(callback, [ + "css-tests/basic.css", + "css-tests/calc.css", + "css-tests/media-query.css", + "css-tests/selectors.css", + ]); } function _runTests(callback, manifest) { var index = -1; @@ -264,7 +267,7 @@ // Load test and expected results. var test = manifest[index]; - var expected = test.replace(/\.js$/, "-expected.js"); + var expected = test.replace(/\.([^\.]+)$/, "-expected.$1"); var xhr1 = new XMLHttpRequest; xhr1.open("GET", test, false); xhr1.send(); @@ -291,6 +294,16 @@ // Compare results. var pass = builder.formattedContent === expectedData; results.push("/* " + (pass ? "PASS" : "FAIL") + ": " + test + " */"); + + // Output failures to console. + if (!pass) { + console.log("Test", test, "Expected", expected); + console.log("Formatted Output", builder.formattedContent.length); + console.log(builder.formattedContent); + console.log("Expected Output", expectedData.length); + console.log(expectedData); + } + runNextTest(); }