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

Unified Diff: chrome/test/data/webui/mocha_adapter.js

Issue 2072643002: MD Settings: animation interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase why not Created 4 years, 5 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 | « chrome/chrome_tests.gypi ('k') | chrome/test/data/webui/settings/animation_browsertest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/mocha_adapter.js
diff --git a/chrome/test/data/webui/mocha_adapter.js b/chrome/test/data/webui/mocha_adapter.js
index 7e544b474f84dceb41820ddffd5357ec1a864ab4..696d9389bd279fa600bde8efb991cee1f9d1aabf 100644
--- a/chrome/test/data/webui/mocha_adapter.js
+++ b/chrome/test/data/webui/mocha_adapter.js
@@ -35,10 +35,14 @@ function BrowserTestReporter(runner) {
var message = 'Mocha test failed: ' + test.fullTitle() + '\n';
// Remove unhelpful mocha lines from stack trace.
- var stack = err.stack.split('\n');
- for (var i = 0; i < stack.length; i++) {
- if (stack[i].indexOf('mocha.js:') == -1)
- message += stack[i] + '\n';
+ if (err.stack) {
+ var stack = err.stack.split('\n');
+ for (var i = 0; i < stack.length; i++) {
+ if (stack[i].indexOf('mocha.js:') == -1)
+ message += stack[i] + '\n';
+ }
+ } else {
+ message += err.toString();
}
console.error(message);
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/webui/settings/animation_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698