Bug 1282599 - Pass test path as a string to xpcshell coverage collector. r=chmanchester draft
authorGreg Mierzwinski <gmierz2@outlook.com>
Mon, 27 Jun 2016 18:17:41 -0400
changeset 381719 a03f8fe2a9736ec41c72cad083da6a6142d343ad
parent 381597 2ab57664bf7cafdd64e136e341527c275fc8c3aa
child 524010 d1e2290005892da0373b85be073c50d4d2b46c60
push id21530
push userbmo:gmierz2@outlook.com
push dateMon, 27 Jun 2016 23:59:33 +0000
reviewerschmanchester
bugs1282599
milestone50.0a1
Bug 1282599 - Pass test path as a string to xpcshell coverage collector. r=chmanchester The test file path is now recorded by the coverage collector as a string rather than a single element array. MozReview-Commit-ID: 9qW0tAKmqMS
testing/xpcshell/head.js
--- a/testing/xpcshell/head.js
+++ b/testing/xpcshell/head.js
@@ -532,31 +532,31 @@ function _execute_test() {
     // added by add_test() and add_task().
     if (typeof run_test === "function") {
       run_test();
     } else {
       run_next_test();
     }
 
     if (coverageCollector != null) {
-      coverageCollector.recordTestCoverage(_TEST_FILE);
+      coverageCollector.recordTestCoverage(_TEST_FILE[0]);
     }
 
     do_test_finished("MAIN run_test");
     _do_main();
     _PromiseTestUtils.assertNoUncaughtRejections();
   } catch (e) {
     _passed = false;
     // do_check failures are already logged and set _quit to true and throw
     // NS_ERROR_ABORT. If both of those are true it is likely this exception
     // has already been logged so there is no need to log it again. It's
     // possible that this will mask an NS_ERROR_ABORT that happens after a
     // do_check failure though.
     if (coverageCollector != null) {
-      coverageCollector.recordTestCoverage(_TEST_FILE);
+      coverageCollector.recordTestCoverage(_TEST_FILE[0]);
     }
 
     if (!_quit || e != Components.results.NS_ERROR_ABORT) {
       let extra = {};
       if (e.fileName) {
         extra.source_file = e.fileName;
         if (e.lineNumber) {
           extra.line_number = e.lineNumber;