Backed out changeset 3219e7712baa (bug 1401207) for eslint failures in testing/talos/talos/tests/devtools/addon/content/damp.js. r=backout

--HG--
extra : amend_source : e45689b157898a7147026ee891b01dc7736ee79b
This commit is contained in:
Sebastian Hengst 2017-10-19 00:06:26 +02:00
Родитель 8191501d4d
Коммит f29266bc8b
2 изменённых файлов: 60 добавлений и 78 удалений

Просмотреть файл

@ -10,52 +10,30 @@ var defaultConfig = {
repeat: 1,
rest: 100,
subtests: {
"cold.inspector": true,
"simple.webconsole": true,
"simple.inspector": true,
"simple.debugger": true,
"simple.styleeditor": true,
"simple.performance": true,
"simple.netmonitor": true,
"simple.saveAndReadHeapSnapshot": true,
"complicated.webconsole": true,
"complicated.inspector": true,
"complicated.debugger": true,
"complicated.styleeditor": true,
"complicated.performance": true,
"complicated.netmonitor": true,
"complicated.saveAndReadHeapSnapshot": true,
"console.bulklog": true,
"console.streamlog": true,
"console.objectexpand": true,
webconsoleOpen: true,
inspectorOpen: true,
debuggerOpen: true,
styleEditorOpen: true,
performanceOpen: true,
netmonitorOpen: true,
saveAndReadHeapSnapshot: true,
consoleBulkLogging: true,
consoleStreamLogging: true,
consoleObjectExpansion: true,
}
};
var testsInfo = {
"cold.inspector": "Measure first open toolbox on inspector panel",
"simple.webconsole": "Measure open/close toolbox on webconsole panel against simple document",
"simple.inspector": "Measure open/close toolbox on inspector panel against simple document",
"simple.debugger": "Measure open/close toolbox on debugger panel against simple document",
"simple.styleeditor": "Measure open/close toolbox on style editor panel against simple document",
"simple.performance": "Measure open/close toolbox on performance panel against simple document",
"simple.netmonitor": "Measure open/close toolbox on network monitor panel against simple document",
"simple.saveAndReadHeapSnapshot": "Measure open/close toolbox on memory panel and save/read heap snapshot against simple document",
"complicated.webconsole": "Measure open/close toolbox on webconsole panel against complicated document",
"complicated.inspector": "Measure open/close toolbox on inspector panel against complicated document",
"complicated.debugger": "Measure open/close toolbox on debugger panel against complicated document",
"complicated.styleeditor": "Measure open/close toolbox on style editor panel against complicated document",
"complicated.performance": "Measure open/close toolbox on performance panel against complicated document",
"complicated.netmonitor": "Measure open/close toolbox on network monitor panel against complicated document",
"complicated.saveAndReadHeapSnapshot": "Measure open/close toolbox on memory panel and save/read heap snapshot against complicated document",
"console.bulklog": "Measure time for a bunch of sync console.log statements to appear",
"console.streamlog": "Measure rAF on page during a stream of console.log statements",
"console.objectexpand": "Measure time to expand a large object and close the console",
webconsoleOpen: "Measure open/close toolbox on webconsole panel",
inspectorOpen: "Measure open/close toolbox on inspector panel",
debuggerOpen: "Measure open/close toolbox on debugger panel",
styleEditorOpen: "Measure open/close toolbox on style editor panel",
performanceOpen: "Measure open/close toolbox on performance panel",
netmonitorOpen: "Measure open/close toolbox on network monitor panel",
saveAndReadHeapSnapshot: "Measure open/close toolbox on memory panel and save/read heap snapshot",
consoleBulkLogging: "Measure time for a bunch of sync console.log statements to appear",
consoleStreamLogging: "Measure rAF on page during a stream of console.log statements",
consoleObjectExpansion: "Measure time to expand a large object and close the console",
};
function updateConfig() {

Просмотреть файл

@ -380,8 +380,8 @@ Damp.prototype = {
},
_getToolLoadingTests(url, label, { expectedMessages, expectedSources }) {
let tests = {
inspector: Task.async(function* () {
let subtests = {
inspectorOpen: Task.async(function* () {
yield this.testSetup(url);
let toolbox = yield this.openToolboxAndLog(label + ".inspector", "inspector");
let onReload = async function() {
@ -396,7 +396,7 @@ Damp.prototype = {
yield this.testTeardown();
}),
webconsole: Task.async(function* () {
webconsoleOpen: Task.async(function* () {
yield this.testSetup(url);
let toolbox = yield this.openToolboxAndLog(label + ".webconsole", "webconsole");
let onReload = async function() {
@ -417,7 +417,7 @@ Damp.prototype = {
yield this.testTeardown();
}),
debugger: Task.async(function* () {
debuggerOpen: Task.async(function* () {
yield this.testSetup(url);
let onLoad = async function(toolbox, dbg) {
await new Promise(done => {
@ -453,7 +453,7 @@ Damp.prototype = {
yield this.testTeardown();
}),
styleeditor: Task.async(function* () {
styleEditorOpen: Task.async(function* () {
yield this.testSetup(url);
yield this.openToolboxAndLog(label + ".styleeditor", "styleeditor");
yield this.reloadPageAndLog(label + ".styleeditor");
@ -461,7 +461,7 @@ Damp.prototype = {
yield this.testTeardown();
}),
performance: Task.async(function* () {
performanceOpen: Task.async(function* () {
yield this.testSetup(url);
yield this.openToolboxAndLog(label + ".performance", "performance");
yield this.reloadPageAndLog(label + ".performance");
@ -469,7 +469,7 @@ Damp.prototype = {
yield this.testTeardown();
}),
netmonitor: Task.async(function* () {
netmonitorOpen: Task.async(function* () {
yield this.testSetup(url);
const toolbox = yield this.openToolboxAndLog(label + ".netmonitor", "netmonitor");
const requestsDone = this.waitForNetworkRequests(label + ".netmonitor", toolbox);
@ -490,12 +490,21 @@ Damp.prototype = {
yield this.testTeardown();
}),
};
// Prefix all tests with the page type (simple or complicated)
for(let name in tests) {
tests[label + "." + name] = tests[name];
delete tests[name];
// Construct the sequence array: config.repeat times config.subtests
let config = this._config;
let sequenceArray = [];
for (var i in config.subtests) {
for (var r = 0; r < config.repeat; r++) {
if (!config.subtests[i] || !subtests[config.subtests[i]]) {
continue;
}
sequenceArray.push(subtests[config.subtests[i]]);
}
}
return tests;
return sequenceArray;
},
testSetup: Task.async(function* (url) {
@ -652,41 +661,36 @@ Damp.prototype = {
TalosParentProfiler.resume("DAMP - start");
let tests = {};
// Run cold test only once
let topWindow = getMostRecentBrowserWindow();
if (!topWindow.coldRunDAMP) {
topWindow.coldRunDAMP = true;
tests["cold.inspector"] = this._coldInspectorOpen;
let tests = [];
if (config.subtests.indexOf("inspectorOpen") > -1) {
// Run cold test only once
let topWindow = getMostRecentBrowserWindow();
if (!topWindow.coldRunDAMP) {
topWindow.coldRunDAMP = true;
tests = tests.concat(this._coldInspectorOpen);
}
}
Object.assign(tests, this._getToolLoadingTests(SIMPLE_URL, "simple", {
tests = tests.concat(this._getToolLoadingTests(SIMPLE_URL, "simple", {
expectedMessages: 1,
expectedSources: 1,
}));
Object.assign(tests, this._getToolLoadingTests(COMPLICATED_URL, "complicated", {
tests = tests.concat(this._getToolLoadingTests(COMPLICATED_URL, "complicated", {
expectedMessages: 7,
expectedSources: 14,
}));
tests["console.bulklog"] = this._consoleBulkLoggingTest;
tests["console.streamlog"] = this._consoleStreamLoggingTest;
tests["console.objectexpand"] = this._consoleObjectExpansionTest;
// Construct the sequence array while filtering tests
let sequenceArray = [];
for (var i in config.subtests) {
for (var r = 0; r < config.repeat; r++) {
if (!config.subtests[i] || !tests[config.subtests[i]]) {
continue;
}
sequenceArray.push(tests[config.subtests[i]]);
}
if (config.subtests.indexOf("consoleBulkLogging") > -1) {
tests = tests.concat(this._consoleBulkLoggingTest);
}
if (config.subtests.indexOf("consoleStreamLogging") > -1) {
tests = tests.concat(this._consoleStreamLoggingTest);
}
if (config.subtests.indexOf("consoleObjectExpansion") > -1) {
tests = tests.concat(this._consoleObjectExpansionTest);
}
this._doSequence(sequenceArray, this._doneInternal);
this._doSequence(tests, this._doneInternal);
}
}