chore: move to clang-format 1.0.17.
clang-format 1.0.17 substantially improves formatting for fat arrow functions and array literal detection. It also fixes a number of minor formatting issues.
This commit is contained in:
@ -44,10 +44,9 @@ var data = require("sdk/self").data;
|
||||
mod.PageMod({
|
||||
include: ['*'],
|
||||
contentScriptFile: data.url("installed_script.js"),
|
||||
onAttach: worker =>
|
||||
{
|
||||
worker.port.on('startProfiler', () => startProfiler());
|
||||
worker.port.on('stopAndRecord', filePath => stopAndRecord(filePath));
|
||||
worker.port.on('forceGC', () => forceGC());
|
||||
}
|
||||
onAttach: worker => {
|
||||
worker.port.on('startProfiler', () => startProfiler());
|
||||
worker.port.on('stopAndRecord', filePath => stopAndRecord(filePath));
|
||||
worker.port.on('forceGC', () => forceGC());
|
||||
}
|
||||
});
|
||||
|
@ -242,7 +242,7 @@ var _SET_TIMEOUT = new OpaqueToken('PerflogMetric.setTimeout');
|
||||
var _BINDINGS = [
|
||||
bind(PerflogMetric)
|
||||
.toFactory((driverExtension, setTimeout, microMetrics, forceGc) =>
|
||||
new PerflogMetric(driverExtension, setTimeout, microMetrics, forceGc),
|
||||
new PerflogMetric(driverExtension, setTimeout, microMetrics, forceGc),
|
||||
[WebDriverExtension, _SET_TIMEOUT, Options.MICRO_METRICS, Options.FORCE_GC]),
|
||||
bind(_SET_TIMEOUT).toValue((fn, millis) => TimerWrapper.setTimeout(fn, millis))
|
||||
];
|
||||
|
@ -100,7 +100,7 @@ var _COLUMN_WIDTH = new OpaqueToken('ConsoleReporter.columnWidth');
|
||||
var _BINDINGS = [
|
||||
bind(ConsoleReporter)
|
||||
.toFactory((columnWidth, sampleDescription, print) =>
|
||||
new ConsoleReporter(columnWidth, sampleDescription, print),
|
||||
new ConsoleReporter(columnWidth, sampleDescription, print),
|
||||
[_COLUMN_WIDTH, SampleDescription, _PRINT]),
|
||||
bind(_COLUMN_WIDTH).toValue(18),
|
||||
bind(_PRINT).toValue(print)
|
||||
|
@ -52,7 +52,7 @@ var _PATH = new OpaqueToken('JsonFileReporter.path');
|
||||
var _BINDINGS = [
|
||||
bind(JsonFileReporter)
|
||||
.toFactory((sampleDescription, path, writeFile, now) =>
|
||||
new JsonFileReporter(sampleDescription, path, writeFile, now),
|
||||
new JsonFileReporter(sampleDescription, path, writeFile, now),
|
||||
[SampleDescription, _PATH, Options.WRITE_FILE, Options.NOW]),
|
||||
bind(_PATH).toValue('.')
|
||||
];
|
||||
|
@ -23,22 +23,23 @@ export class SampleDescription {
|
||||
toJson() { return {'id': this.id, 'description': this.description, 'metrics': this.metrics}; }
|
||||
}
|
||||
|
||||
var _BINDINGS =
|
||||
[bind(SampleDescription)
|
||||
.toFactory((metric, id, forceGc, userAgent, validator, defaultDesc, userDesc) =>
|
||||
new SampleDescription(id, [
|
||||
{'forceGc': forceGc, 'userAgent': userAgent},
|
||||
validator.describe(),
|
||||
defaultDesc,
|
||||
userDesc
|
||||
],
|
||||
metric.describe()),
|
||||
[
|
||||
Metric,
|
||||
Options.SAMPLE_ID,
|
||||
Options.FORCE_GC,
|
||||
Options.USER_AGENT,
|
||||
Validator,
|
||||
Options.DEFAULT_DESCRIPTION,
|
||||
Options.SAMPLE_DESCRIPTION
|
||||
])];
|
||||
var _BINDINGS = [
|
||||
bind(SampleDescription)
|
||||
.toFactory((metric, id, forceGc, userAgent, validator, defaultDesc, userDesc) =>
|
||||
new SampleDescription(id, [
|
||||
{'forceGc': forceGc, 'userAgent': userAgent},
|
||||
validator.describe(),
|
||||
defaultDesc,
|
||||
userDesc
|
||||
],
|
||||
metric.describe()),
|
||||
[
|
||||
Metric,
|
||||
Options.SAMPLE_ID,
|
||||
Options.FORCE_GC,
|
||||
Options.USER_AGENT,
|
||||
Validator,
|
||||
Options.DEFAULT_DESCRIPTION,
|
||||
Options.SAMPLE_DESCRIPTION
|
||||
])
|
||||
];
|
||||
|
@ -95,26 +95,27 @@ export class SampleState {
|
||||
constructor(public completeSample: List<any>, public validSample: List<any>) {}
|
||||
}
|
||||
|
||||
var _BINDINGS =
|
||||
[bind(Sampler)
|
||||
.toFactory((driver, metric, reporter, validator, prepare, execute, now) => new Sampler({
|
||||
driver: driver,
|
||||
reporter: reporter,
|
||||
validator: validator,
|
||||
metric: metric,
|
||||
// TODO(tbosch): DI right now does not support null/undefined objects
|
||||
// Mostly because the cache would have to be initialized with a
|
||||
// special null object, which is expensive.
|
||||
prepare: prepare !== false ? prepare : null,
|
||||
execute: execute,
|
||||
now: now
|
||||
}),
|
||||
[
|
||||
WebDriverAdapter,
|
||||
Metric,
|
||||
Reporter,
|
||||
Validator,
|
||||
Options.PREPARE,
|
||||
Options.EXECUTE,
|
||||
Options.NOW
|
||||
])];
|
||||
var _BINDINGS = [
|
||||
bind(Sampler)
|
||||
.toFactory((driver, metric, reporter, validator, prepare, execute, now) => new Sampler({
|
||||
driver: driver,
|
||||
reporter: reporter,
|
||||
validator: validator,
|
||||
metric: metric,
|
||||
// TODO(tbosch): DI right now does not support null/undefined objects
|
||||
// Mostly because the cache would have to be initialized with a
|
||||
// special null object, which is expensive.
|
||||
prepare: prepare !== false ? prepare : null,
|
||||
execute: execute,
|
||||
now: now
|
||||
}),
|
||||
[
|
||||
WebDriverAdapter,
|
||||
Metric,
|
||||
Reporter,
|
||||
Validator,
|
||||
Options.PREPARE,
|
||||
Options.EXECUTE,
|
||||
Options.NOW
|
||||
])
|
||||
];
|
||||
|
@ -20,21 +20,20 @@ export class WebDriverExtension {
|
||||
ListWrapper.map(childTokens, (token) => injector.asyncGet(token))),
|
||||
[Injector]),
|
||||
bind(WebDriverExtension)
|
||||
.toFactory((children, capabilities) =>
|
||||
{
|
||||
var delegate;
|
||||
ListWrapper.forEach(children, (extension) => {
|
||||
if (extension.supports(capabilities)) {
|
||||
delegate = extension;
|
||||
}
|
||||
});
|
||||
if (isBlank(delegate)) {
|
||||
throw new BaseException(
|
||||
'Could not find a delegate for given capabilities!');
|
||||
}
|
||||
return delegate;
|
||||
},
|
||||
[_CHILDREN, Options.CAPABILITIES])
|
||||
.toFactory(
|
||||
(children, capabilities) => {
|
||||
var delegate;
|
||||
ListWrapper.forEach(children, (extension) => {
|
||||
if (extension.supports(capabilities)) {
|
||||
delegate = extension;
|
||||
}
|
||||
});
|
||||
if (isBlank(delegate)) {
|
||||
throw new BaseException('Could not find a delegate for given capabilities!');
|
||||
}
|
||||
return delegate;
|
||||
},
|
||||
[_CHILDREN, Options.CAPABILITIES])
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -132,5 +132,7 @@ function normalizeEvent(chromeEvent: StringMap<string, any>,
|
||||
return result;
|
||||
}
|
||||
|
||||
var _BINDINGS = [bind(ChromeDriverExtension)
|
||||
.toFactory((driver) => new ChromeDriverExtension(driver), [WebDriverAdapter])];
|
||||
var _BINDINGS = [
|
||||
bind(ChromeDriverExtension)
|
||||
.toFactory((driver) => new ChromeDriverExtension(driver), [WebDriverAdapter])
|
||||
];
|
||||
|
@ -128,5 +128,7 @@ function createMarkEndEvent(name, time) {
|
||||
return createEvent('e', name, time);
|
||||
}
|
||||
|
||||
var _BINDINGS = [bind(IOsDriverExtension)
|
||||
.toFactory((driver) => new IOsDriverExtension(driver), [WebDriverAdapter])];
|
||||
var _BINDINGS = [
|
||||
bind(IOsDriverExtension)
|
||||
.toFactory((driver) => new IOsDriverExtension(driver), [WebDriverAdapter])
|
||||
];
|
||||
|
Reference in New Issue
Block a user