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

Unified Diff: tracing/tracing/ui/analysis/memory_dump_allocator_details_pane_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
Index: tracing/tracing/ui/analysis/memory_dump_allocator_details_pane_test.html
diff --git a/tracing/tracing/ui/analysis/memory_dump_allocator_details_pane_test.html b/tracing/tracing/ui/analysis/memory_dump_allocator_details_pane_test.html
index 6fa05333b70ae20a781e26b31f6fd21c8b7a7a0e..f87573010fb0011c918c50b21ce14b0623aeb745 100644
--- a/tracing/tracing/ui/analysis/memory_dump_allocator_details_pane_test.html
+++ b/tracing/tracing/ui/analysis/memory_dump_allocator_details_pane_test.html
@@ -66,8 +66,9 @@ tr.b.unittest.testSuite(function() {
function newSuballocationDump(ownerDump, parentDump, name, size) {
var suballocationDump = addChildDump(parentDump, name,
{numerics: {size: size}});
- if (ownerDump !== undefined)
+ if (ownerDump !== undefined) {
addOwnershipLink(ownerDump, suballocationDump);
+ }
return suballocationDump;
}
@@ -163,8 +164,7 @@ tr.b.unittest.testSuite(function() {
function createSizeFields(values) {
return values.map(function(value) {
- if (value === undefined)
- return undefined;
+ if (value === undefined) return undefined;
return new Scalar(sizeInBytes_smallerIsBetter, value);
});
}
@@ -181,10 +181,11 @@ tr.b.unittest.testSuite(function() {
function checkRow(columns, row, expectations) {
var formattedTitle = columns[0].formatTitle(row);
var expectedTitle = expectations.title;
- if (typeof expectedTitle === 'function')
+ if (typeof expectedTitle === 'function') {
expectedTitle(formattedTitle);
- else
+ } else {
assert.equal(formattedTitle, expectedTitle);
+ }
checkSizeNumericFields(row, columns[1], expectations.size);
checkSizeNumericFields(row, columns[2], expectations.effective_size);
@@ -194,16 +195,18 @@ tr.b.unittest.testSuite(function() {
checkStringFields(row, columns[5], expectations.url);
var expectedSubRowCount = expectations.sub_row_count;
- if (expectedSubRowCount === undefined)
+ if (expectedSubRowCount === undefined) {
assert.isUndefined(row.subRows);
- else
+ } else {
assert.lengthOf(row.subRows, expectedSubRowCount);
+ }
var expectedContexts = expectations.contexts;
- if (expectedContexts === undefined)
+ if (expectedContexts === undefined) {
assert.isUndefined(row.contexts);
- else
+ } else {
assert.deepEqual(tr.b.asArray(row.contexts), expectedContexts);
+ }
}
function buildProcessMemoryDumps(count, preFinalizeDumpsCallback) {
@@ -222,8 +225,7 @@ tr.b.unittest.testSuite(function() {
function getAllocatorDumps(pmds, fullName) {
return pmds.map(function(pmd) {
- if (pmd === undefined)
- return undefined;
+ if (pmd === undefined) return undefined;
return pmd.getMemoryAllocatorDumpByFullName(fullName);
});
}
@@ -231,8 +233,7 @@ tr.b.unittest.testSuite(function() {
function checkAllocatorPaneColumnInfosAndColor(
column, dumps, numericName, expectedInfos) {
var numerics = dumps.map(function(dump) {
- if (dump === undefined)
- return undefined;
+ if (dump === undefined) return undefined;
return dump.numerics[numericName];
});
checkColumnInfosAndColor(
@@ -608,8 +609,7 @@ tr.b.unittest.testSuite(function() {
test('heapDumpsPassThrough', function() {
var processMemoryDumps = createProcessMemoryDumps();
var heapDumps = processMemoryDumps.map(function(dump) {
- if (dump === undefined)
- return undefined;
+ if (dump === undefined) return undefined;
return new HeapDump(dump, 'v8');
});

Powered by Google App Engine
This is Rietveld 408576698