Bug 669252 - Use the string "unknown test url" in mochitest logging lines if the current test URL is unknown. r=ted
authorCameron McCormack <cam@mcc.id.au>
Sat, 09 Jul 2011 16:49:01 +1200
changeset 73375 e70a8a4c1d059cb9fd01054fab0c5dabdb83a1ec
parent 73374 14750ef487b5951686ebc9aeb752451715514e4b
child 73376 5dfcc562b0a90a9b5ae51da41333c8e3905cabfb
push id235
push userbzbarsky@mozilla.com
push dateTue, 27 Sep 2011 17:13:04 +0000
treeherdermozilla-beta@2d1e082d176a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs669252
milestone8.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 669252 - Use the string "unknown test url" in mochitest logging lines if the current test URL is unknown. r=ted
testing/mochitest/tests/SimpleTest/SimpleTest.js
--- a/testing/mochitest/tests/SimpleTest/SimpleTest.js
+++ b/testing/mochitest/tests/SimpleTest/SimpleTest.js
@@ -104,17 +104,17 @@ SimpleTest.todo = function(condition, na
     var test = {'result': !!condition, 'name': name, 'diag': diag, todo: true};
     SimpleTest._logResult(test, "TEST-UNEXPECTED-PASS", "TEST-KNOWN-FAIL");
     SimpleTest._tests.push(test);
 };
 
 SimpleTest._getCurrentTestURL = function() {
     return parentRunner && parentRunner.currentTestURL ||
            typeof gTestPath == "string" && gTestPath ||
-           "";
+           "unknown test url";
 };
 
 SimpleTest._logResult = function(test, passString, failString) {
     var isError = !test.result == !test.todo;
     var resultString = test.result ? passString : failString;
     var url = SimpleTest._getCurrentTestURL();
     var diagnostic = test.name + (test.diag ? " - " + test.diag : "");
     var msg = [resultString, url, diagnostic].join(" | ");