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

Unified Diff: tracing/tracing/base/timing_test.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/timing.html ('k') | tracing/tracing/base/unit.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/base/timing_test.html
diff --git a/tracing/tracing/base/timing_test.html b/tracing/tracing/base/timing_test.html
index ce50ecd0872169af101ca0d5665462264c27d547..25a385ef0546a2f6911471d26f24513570c7141b 100644
--- a/tracing/tracing/base/timing_test.html
+++ b/tracing/tracing/base/timing_test.html
@@ -13,8 +13,8 @@ tr.b.unittest.testSuite(function() {
var Timing = tr.b.Timing;
test('computeUserTimingMarkName', function() {
- if (tr.isHeadless)
- return;
+ if (tr.isHeadless) return;
+
var name1 = tr.b._computeUserTimingMarkName('Test', 'test1', {'a': 1});
assert.equal(name1, 'Test:test1/eyJhIjoxfQ==');
var name2 = tr.b._computeUserTimingMarkName('Test', 'test2');
@@ -25,8 +25,8 @@ tr.b.unittest.testSuite(function() {
});
test('TimingMarkWithoutArgs', function() {
- if (tr.isHeadless)
- return;
+ if (tr.isHeadless) return;
+
var markedTime = Timing.mark('Test', 'TimingMarkWithoutArgs');
markedTime.end();
var result = window.performance.getEntriesByName(
@@ -36,8 +36,8 @@ tr.b.unittest.testSuite(function() {
});
test('TimingMarkWithArgs', function() {
- if (tr.isHeadless)
- return;
+ if (tr.isHeadless) return;
+
var markedTime = Timing.mark('Test', 'TimingMarkWithoutArgs', {'a': 1});
markedTime.end();
var result = window.performance.getEntriesByName(
@@ -53,12 +53,13 @@ tr.b.unittest.testSuite(function() {
});
test('TimingWrap', function(done) {
- if (tr.isHeadless)
- return;
+ if (tr.isHeadless) return;
+
Timing.wrap('Test', function addTo1000() {
var x = 0;
- for (var i = 0; i <= 1000; ++i)
+ for (var i = 0; i <= 1000; ++i) {
x += i;
+ }
assert.equal(x, 500500);
})();
var result = window.performance.getEntriesByName('Test:addTo1000');
@@ -67,12 +68,13 @@ tr.b.unittest.testSuite(function() {
});
test('TimingWrapNamedFunction', function() {
- if (tr.isHeadless)
- return;
+ if (tr.isHeadless) return;
+
Timing.wrapNamedFunction('Test', 'addTo100', function() {
var x = 0;
- for (var i = 0; i <= 100; ++i)
+ for (var i = 0; i <= 100; ++i) {
x += i;
+ }
assert.equal(x, 5050);
})();
var result = window.performance.getEntriesByName('Test:addTo100');
« no previous file with comments | « tracing/tracing/base/timing.html ('k') | tracing/tracing/base/unit.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698