cleanup: Use new indentation style for object literals

We have made good progress on object literals as well, although there
are still a lot that use the old style, given how ubiquitous object
literals are.

But the needed reindentation isn't overly intrusive, as changes are
limited to the object literals themselves (i.e. they don't affect
surrounding code).

And given that object literals account for quite a bit of the remaining
differences between regular and legacy rules, doing the transition now
is still worthwhile.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2200>
This commit is contained in:
Florian Müllner
2020-03-29 23:51:13 +02:00
committed by Marge Bot
parent ac9fbe92e5
commit 2b45a01517
70 changed files with 1357 additions and 852 deletions

View File

@ -16,59 +16,86 @@ const Scripting = imports.ui.scripting;
// on a particular system.
var METRICS = {
overviewLatencyFirst:
{ description: "Time to first frame after triggering overview, first time",
units: "us" },
overviewFpsFirst:
{ description: "Frame rate when going to the overview, first time",
units: "frames / s" },
overviewLatencySubsequent:
{ description: "Time to first frame after triggering overview, second time",
units: "us" },
overviewFpsSubsequent:
{ description: "Frames rate when going to the overview, second time",
units: "frames / s" },
overviewFps5Windows:
{ description: "Frames rate when going to the overview, 5 windows open",
units: "frames / s" },
overviewFps10Windows:
{ description: "Frames rate when going to the overview, 10 windows open",
units: "frames / s" },
overviewFps5Maximized:
{ description: "Frames rate when going to the overview, 5 maximized windows open",
units: "frames / s" },
overviewFps10Maximized:
{ description: "Frames rate when going to the overview, 10 maximized windows open",
units: "frames / s" },
overviewFps5Alpha:
{ description: "Frames rate when going to the overview, 5 alpha-transparent windows open",
units: "frames / s" },
overviewFps10Alpha:
{ description: "Frames rate when going to the overview, 10 alpha-transparent windows open",
units: "frames / s" },
usedAfterOverview:
{ description: "Malloc'ed bytes after the overview is shown once",
units: "B" },
leakedAfterOverview:
{ description: "Additional malloc'ed bytes the second time the overview is shown",
units: "B" },
applicationsShowTimeFirst:
{ description: "Time to switch to applications view, first time",
units: "us" },
applicationsShowTimeSubsequent:
{ description: "Time to switch to applications view, second time",
units: "us" },
overviewLatencyFirst: {
description: 'Time to first frame after triggering overview, first time',
units: 'us',
},
overviewFpsFirst: {
description: 'Frame rate when going to the overview, first time',
units: 'frames / s',
},
overviewLatencySubsequent: {
description: 'Time to first frame after triggering overview, second time',
units: 'us',
},
overviewFpsSubsequent: {
description: 'Frames rate when going to the overview, second time',
units: 'frames / s',
},
overviewFps5Windows: {
description: 'Frames rate when going to the overview, 5 windows open',
units: 'frames / s',
},
overviewFps10Windows: {
description: 'Frames rate when going to the overview, 10 windows open',
units: 'frames / s',
},
overviewFps5Maximized: {
description: 'Frames rate when going to the overview, 5 maximized windows open',
units: 'frames / s',
},
overviewFps10Maximized: {
description: 'Frames rate when going to the overview, 10 maximized windows open',
units: 'frames / s',
},
overviewFps5Alpha: {
description: 'Frames rate when going to the overview, 5 alpha-transparent windows open',
units: 'frames / s',
},
overviewFps10Alpha: {
description: 'Frames rate when going to the overview, 10 alpha-transparent windows open',
units: 'frames / s',
},
usedAfterOverview: {
description: "Malloc'ed bytes after the overview is shown once",
units: 'B',
},
leakedAfterOverview: {
description: "Additional malloc'ed bytes the second time the overview is shown",
units: 'B',
},
applicationsShowTimeFirst: {
description: 'Time to switch to applications view, first time',
units: 'us',
},
applicationsShowTimeSubsequent: {
description: 'Time to switch to applications view, second time',
units: 'us',
},
};
let WINDOW_CONFIGS = [
{ width: 640, height: 480, alpha: false, maximized: false, count: 1, metric: 'overviewFpsSubsequent' },
{ width: 640, height: 480, alpha: false, maximized: false, count: 5, metric: 'overviewFps5Windows' },
{ width: 640, height: 480, alpha: false, maximized: false, count: 10, metric: 'overviewFps10Windows' },
{ width: 640, height: 480, alpha: false, maximized: true, count: 5, metric: 'overviewFps5Maximized' },
{ width: 640, height: 480, alpha: false, maximized: true, count: 10, metric: 'overviewFps10Maximized' },
{ width: 640, height: 480, alpha: true, maximized: false, count: 5, metric: 'overviewFps5Alpha' },
{ width: 640, height: 480, alpha: true, maximized: false, count: 10, metric: 'overviewFps10Alpha' },
];
const WINDOW_CONFIGS = [{
width: 640, height: 480,
alpha: false, maximized: false, count: 1, metric: 'overviewFpsSubsequent',
}, {
width: 640, height: 480,
alpha: false, maximized: false, count: 5, metric: 'overviewFps5Windows',
}, {
width: 640, height: 480,
alpha: false, maximized: false, count: 10, metric: 'overviewFps10Windows',
}, {
width: 640, height: 480,
alpha: false, maximized: true, count: 5, metric: 'overviewFps5Maximized',
}, {
width: 640, height: 480,
alpha: false, maximized: true, count: 10, metric: 'overviewFps10Maximized',
}, {
width: 640, height: 480,
alpha: true, maximized: false, count: 5, metric: 'overviewFps5Alpha',
}, {
width: 640, height: 480,
alpha: true, maximized: false, count: 10, metric: 'overviewFps10Alpha',
}];
async function run() {
/* eslint-disable no-await-in-loop */
@ -96,10 +123,12 @@ async function run() {
await Scripting.destroyTestWindows();
for (let k = 0; k < config.count; k++) {
await Scripting.createTestWindow({ width: config.width,
height: config.height,
alpha: config.alpha,
maximized: config.maximized });
await Scripting.createTestWindow({
width: config.width,
height: config.height,
alpha: config.alpha,
maximized: config.maximized,
});
}
await Scripting.waitTestWindows();