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

Unified Diff: tracing/tracing/base/unittest/test_runner.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase Created 3 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 | « tracing/tracing/base/unittest/test_case.html ('k') | tracing/tracing/base/unittest/test_suite.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/base/unittest/test_runner.html
diff --git a/tracing/tracing/base/unittest/test_runner.html b/tracing/tracing/base/unittest/test_runner.html
index 167cc1f872f538b7b222cde5036b2368b403df53..898234c3770284a577b81396dbaa60900453c48e 100644
--- a/tracing/tracing/base/unittest/test_runner.html
+++ b/tracing/tracing/base/unittest/test_runner.html
@@ -28,8 +28,9 @@ tr.exportTo('tr.b.unittest', function() {
global.onerror = function(errorMsg, url, lineNumber) {
runner.results.addErrorForCurrentTest(
errorMsg + ' at ' + url + ':' + lineNumber);
- if (realGlobalOnError)
+ if (realGlobalOnError) {
return realGlobalOnError(errorMsg, url, lineNumber);
+ }
return false;
};
}
@@ -88,8 +89,9 @@ tr.exportTo('tr.b.unittest', function() {
__proto__: Object.prototype,
beginRunning: function() {
- if (this.pendingTestCases_.length)
+ if (this.pendingTestCases_.length) {
throw new Error('Tests still running!');
+ }
this.runCompletedPromise = new Promise(function(resolve, reject) {
this.runCompletedResolver_ = {
@@ -108,8 +110,9 @@ tr.exportTo('tr.b.unittest', function() {
},
beginToStopRunning: function() {
- if (!this.runCompletedResolver_)
+ if (!this.runCompletedResolver_) {
throw new Error('Still running');
+ }
this.pendingTestCases_ = [];
return this.runCompletedPromise;
},
@@ -123,8 +126,7 @@ tr.exportTo('tr.b.unittest', function() {
},
scheduleRunOneTestCase_: function() {
- if (this.runOneTestCaseScheduled_)
- return;
+ if (this.runOneTestCaseScheduled_) return;
this.runOneTestCaseScheduled_ = true;
this.numRunsSinceLastRIC_++;
@@ -170,8 +172,9 @@ tr.exportTo('tr.b.unittest', function() {
function pass(result) {
try {
this.tearDownCurrentTestCase_(true);
- if (result)
+ if (result) {
this.results_.setReturnValueFromCurrentTest(result);
+ }
this.results_.didCurrentTestEnd();
this.currentMark_.end();
this.currentTestCase_ = undefined;
« no previous file with comments | « tracing/tracing/base/unittest/test_case.html ('k') | tracing/tracing/base/unittest/test_suite.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698