Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Unified Diff: LayoutTests/http/tests/resources/testharnessreport.js

Issue 214133003: Convert LayoutTests/http/tests/resources/testharness.js from CRLF to LF (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/http/tests/resources/testharness.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/resources/testharnessreport.js
diff --git a/LayoutTests/http/tests/resources/testharnessreport.js b/LayoutTests/http/tests/resources/testharnessreport.js
index 20cdbb6919030b4d949376375290542f8faa4b54..8d72d9acc0922023778d2635f9cf4cdac2cd3fd4 100644
--- a/LayoutTests/http/tests/resources/testharnessreport.js
+++ b/LayoutTests/http/tests/resources/testharnessreport.js
@@ -1,79 +1,79 @@
-/*
- * THIS FILE INTENTIONALLY LEFT BLANK
- *
- * More specifically, this file is intended for vendors to implement
- * code needed to integrate testharness.js tests with their own test systems.
- *
- * Typically such integration will attach callbacks when each test is
- * has run, using add_result_callback(callback(test)), or when the whole test file has
- * completed, using add_completion_callback(callback(tests, harness_status)).
- *
- * For more documentation about the callback functions and the
- * parameters they are called with see testharness.js
- */
-
-// Setup for WebKit JavaScript tests
-if (self.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-}
-
-// Function used to convert the test status code into
-// the corresponding string
-function convertResult(resultStatus){
- if(resultStatus == 0)
- return("PASS");
- else if(resultStatus == 1)
- return("FAIL");
- else if(resultStatus == 2)
- return("TIMEOUT");
- else
- return("NOTRUN");
-}
-
-/* Disable the default output of testharness.js. The default output formats
-* test results into an HTML table. When that table is dumped as text, no
-* spacing between cells is preserved, and it is therefore not readable. By
-* setting output to false, the HTML table will not be created
-*/
-setup({"output":false});
-
-/* Using a callback function, test results will be added to the page in a
-* manner that allows dumpAsText to produce readable test results
-*/
-add_completion_callback(function (tests, harness_status){
-
- // Create element to hold results
- var results = document.createElement("pre");
-
- // Declare result string
- var resultStr = "\n";
-
- // Check harness_status. If it is not 0, tests did not
- // execute correctly, output the error code and message
- if(harness_status.status != 0){
- resultStr += "Harness Error. harness_status.status = " +
- harness_status.status +
- " , harness_status.message = " +
- harness_status.message;
- }
- else {
- // Iterate through tests array and build string that contains
- // results for all tests
- for(var i=0; i<tests.length; i++){
- resultStr += convertResult(tests[i].status) + " " +
- ( (tests[i].name!=null) ? tests[i].name : "" ) + " " +
- ( (tests[i].message!=null) ? tests[i].message : "" ) +
- "\n";
- }
- }
-
- // Set results element's innerHTML to the results string
- results.innerHTML = resultStr;
-
- // Add results element to document
- document.body.appendChild(results);
-
- if (self.testRunner)
- testRunner.notifyDone();
-});
+/*
+ * THIS FILE INTENTIONALLY LEFT BLANK
+ *
+ * More specifically, this file is intended for vendors to implement
+ * code needed to integrate testharness.js tests with their own test systems.
+ *
+ * Typically such integration will attach callbacks when each test is
+ * has run, using add_result_callback(callback(test)), or when the whole test file has
+ * completed, using add_completion_callback(callback(tests, harness_status)).
+ *
+ * For more documentation about the callback functions and the
+ * parameters they are called with see testharness.js
+ */
+
+// Setup for WebKit JavaScript tests
+if (self.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+// Function used to convert the test status code into
+// the corresponding string
+function convertResult(resultStatus){
+ if(resultStatus == 0)
+ return("PASS");
+ else if(resultStatus == 1)
+ return("FAIL");
+ else if(resultStatus == 2)
+ return("TIMEOUT");
+ else
+ return("NOTRUN");
+}
+
+/* Disable the default output of testharness.js. The default output formats
+* test results into an HTML table. When that table is dumped as text, no
+* spacing between cells is preserved, and it is therefore not readable. By
+* setting output to false, the HTML table will not be created
+*/
+setup({"output":false});
+
+/* Using a callback function, test results will be added to the page in a
+* manner that allows dumpAsText to produce readable test results
+*/
+add_completion_callback(function (tests, harness_status){
+
+ // Create element to hold results
+ var results = document.createElement("pre");
+
+ // Declare result string
+ var resultStr = "\n";
+
+ // Check harness_status. If it is not 0, tests did not
+ // execute correctly, output the error code and message
+ if(harness_status.status != 0){
+ resultStr += "Harness Error. harness_status.status = " +
+ harness_status.status +
+ " , harness_status.message = " +
+ harness_status.message;
+ }
+ else {
+ // Iterate through tests array and build string that contains
+ // results for all tests
+ for(var i=0; i<tests.length; i++){
+ resultStr += convertResult(tests[i].status) + " " +
+ ( (tests[i].name!=null) ? tests[i].name : "" ) + " " +
+ ( (tests[i].message!=null) ? tests[i].message : "" ) +
+ "\n";
+ }
+ }
+
+ // Set results element's innerHTML to the results string
+ results.innerHTML = resultStr;
+
+ // Add results element to document
+ document.body.appendChild(results);
+
+ if (self.testRunner)
+ testRunner.notifyDone();
+});
« no previous file with comments | « LayoutTests/http/tests/resources/testharness.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698