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

Unified Diff: tracing/tracing/model/global_memory_dump_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/model/global_memory_dump.html ('k') | tracing/tracing/model/helpers/android_app.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/global_memory_dump_test.html
diff --git a/tracing/tracing/model/global_memory_dump_test.html b/tracing/tracing/model/global_memory_dump_test.html
index 495763eb3e6a5e5f844e6c5c91df1e7715ff4f7a..35efda1e1eade6be98c024036dca957c7c2e8407 100644
--- a/tracing/tracing/model/global_memory_dump_test.html
+++ b/tracing/tracing/model/global_memory_dump_test.html
@@ -126,8 +126,9 @@ tr.b.unittest.testSuite(function() {
function createContainerDumps(processMemoryDumpCount, opt_model) {
var model = opt_model;
- if (model === undefined)
+ if (model === undefined) {
model = new Model();
+ }
var gmd = new GlobalMemoryDump(model, 0);
model.globalMemoryDumps.push(gmd);
@@ -196,8 +197,7 @@ tr.b.unittest.testSuite(function() {
var ownableDumps = {}; // ownable GUID -> ownable dump.
function buildAndAddDumpTrees(containerDump, treeRecipes) {
- if (treeRecipes === undefined)
- return;
+ if (treeRecipes === undefined) return;
function buildDumpTreeRecursively(treeRecipe, namePrefix) {
var skipBuild = treeRecipe['skip_build'];
@@ -225,8 +225,9 @@ tr.b.unittest.testSuite(function() {
ownableDumps[guid] = dump;
}
if (owns !== undefined) {
- if (!(owns in ownerDumps))
+ if (!(owns in ownerDumps)) {
ownerDumps[owns] = [];
+ }
ownerDumps[owns].push({dump: dump, importance: importance});
} else {
assert.isUndefined(importance); // Test sanity check.
@@ -235,8 +236,7 @@ tr.b.unittest.testSuite(function() {
if (treeRecipe.children !== undefined) {
treeRecipe.children.forEach(function(childTreeRecipe) {
// Virtual children are added during size calculation.
- if (childTreeRecipe['skip_build'] === true)
- return;
+ if (childTreeRecipe['skip_build'] === true) return;
var childDump =
buildDumpTreeRecursively(childTreeRecipe, fullName + '/');
childDump.parent = dump;
@@ -255,8 +255,7 @@ tr.b.unittest.testSuite(function() {
}
}
- if (weak)
- dump.weak = true;
+ if (weak) dump.weak = true;
return dump;
}
@@ -270,8 +269,9 @@ tr.b.unittest.testSuite(function() {
// Recursively build memory allocator dump trees for all container dumps.
var containerDumps = createContainerDumps(
allTreeRecipes.length - 1, opt_model);
- for (var i = 0; i < allTreeRecipes.length; i++)
+ for (var i = 0; i < allTreeRecipes.length; i++) {
buildAndAddDumpTrees(containerDumps[i], allTreeRecipes[i]);
+ }
// Hook up ownership links.
for (var [ownedGuid, ownershipInfos] of Object.entries(ownerDumps)) {
@@ -363,10 +363,11 @@ tr.b.unittest.testSuite(function() {
assertSizeNumeric(dump, 'size', expectedSize);
assertSizeNumeric(dump, 'subsystem_size', undefined);
- if (expectedIsOwner)
+ if (expectedIsOwner) {
assert.isDefined(dump.owns);
- else
+ } else {
assert.isUndefined(dump.owns);
+ }
assert.lengthOf(dump.ownedBy, expectedOwnersCount);
assert.strictEqual(dump.containerMemoryDump, expectedContainerDump);
@@ -863,8 +864,9 @@ tr.b.unittest.testSuite(function() {
var containerDumps = createContainerDumps(0);
var gmd = containerDumps[0];
var parentDump = new MemoryAllocatorDump(gmd, 'parent');
- for (var i = 1; i <= 3; i++)
+ for (var i = 1; i <= 3; i++) {
addChildDump(parentDump, 'child' + i);
+ }
var otherDump = new MemoryAllocatorDump(gmd, 'other');
gmd.memoryAllocatorDumps = [parentDump, otherDump];
« no previous file with comments | « tracing/tracing/model/global_memory_dump.html ('k') | tracing/tracing/model/helpers/android_app.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698