new file mode 100644
--- /dev/null
+++ b/devtools/client/performance/test/unit/.eslintrc
@@ -0,0 +1,4 @@
+{
+ // Extend from the shared list of defined globals for mochitests.
+ "extends": "../../../../.eslintrc.xpcshell"
+}
--- a/devtools/client/performance/test/unit/head.js
+++ b/devtools/client/performance/test/unit/head.js
@@ -1,34 +1,35 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
-
+/* exported Cc, Ci, Cu, Cr, Services, console, PLATFORM_DATA_PREF, getFrameNodePath,
+ synthesizeProfileForTest */
var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
var Services = require("Services");
var { console } = require("resource://gre/modules/Console.jsm");
const RecordingUtils = require("devtools/shared/performance/recording-utils");
const PLATFORM_DATA_PREF = "devtools.performance.ui.show-platform-data";
/**
* Get a path in a FrameNode call tree.
*/
function getFrameNodePath(root, path) {
let calls = root.calls;
- let node;
+ let foundNode;
for (let key of path.split(" > ")) {
- node = calls.find((node) => node.key == key);
- if (!node) {
+ foundNode = calls.find((node) => node.key == key);
+ if (!foundNode) {
break;
}
calls = node.calls;
}
- return node;
+ return foundNode;
}
/**
* Synthesize a profile for testing.
*/
function synthesizeProfileForTest(samples) {
samples.unshift({
time: 0,
--- a/devtools/client/performance/test/unit/test_frame-utils-01.js
+++ b/devtools/client/performance/test/unit/test_frame-utils-01.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests that frame-utils isContent and parseLocation work as intended
* when parsing over frames from the profiler.
*/
const CONTENT_LOCATIONS = [
"hello/<.world (https://foo/bar.js:123:987)",
@@ -47,78 +48,85 @@ function run_test() {
add_task(function () {
const { computeIsContentAndCategory, parseLocation } = require("devtools/client/performance/modules/logic/frame-utils");
let isContent = (frame) => {
computeIsContentAndCategory(frame);
return frame.isContent;
};
-
for (let frame of CONTENT_LOCATIONS) {
- ok(isContent.apply(null, frameify(frame)), `${frame[0]} should be considered a content frame.`);
+ ok(isContent.apply(null, frameify(frame)),
+ `${frame[0]} should be considered a content frame.`);
}
for (let frame of CHROME_LOCATIONS) {
- ok(!isContent.apply(null, frameify(frame)), `${frame[0]} should not be considered a content frame.`);
+ ok(!isContent.apply(null, frameify(frame)),
+ `${frame[0]} should not be considered a content frame.`);
}
// functionName, fileName, host, url, line, column
- const FIELDS = ["functionName", "fileName", "host", "url", "line", "column", "host", "port"];
+ const FIELDS = ["functionName", "fileName", "host", "url", "line", "column", "host",
+ "port"];
+
+ /* eslint-disable max-len */
const PARSED_CONTENT = [
["hello/<.world", "bar.js", "foo", "https://foo/bar.js", 123, 987, "foo", null],
["hello/<.world", "bar.js", "foo", "http://foo/bar.js", 123, 987, "foo", null],
["hello/<.world", "bar.js", "foo", "http://foo/bar.js", 123, null, "foo", null],
["hello/<.world", "bar.js", "foo", "http://foo/bar.js#baz", 123, 987, "foo", null],
["hello/<.world", "bar.js", "foo", "http://foo/bar.js?myquery=params&search=1", 123, 987, "foo", null],
["hello/<.world", "/", "foo", "http://foo/#bar", 123, 987, "foo", null],
["hello/<.world", "/", "foo", "http://foo/", 123, 987, "foo", null],
["hello/<.world", "file.js", "localhost:8888", "http://localhost:8888/file.js", 100, 1, "localhost:8888", 8888],
["hello/<.world", "file.js", "localhost:8888", "http://localhost:8888/file.js", 100, null, "localhost:8888", 8888],
["hello/<.world", "file.js (eval:1)", "localhost:8888", "http://localhost:8888/file.js", 65, null, "localhost:8888", 8888],
["hello/<.world", "/", "localhost:8888", "http://localhost:8888/", 1, null, "localhost:8888", 8888],
["hello/<.world", "/", "localhost:8888", "http://localhost:8888/", 100, 50, "localhost:8888", 8888],
["Native[\"arraycopy(blah)\"]", "profiler.html", "localhost:8888", "http://localhost:8888/profiler.html", 4, null, "localhost:8888", 8888],
["Native[\"arraycopy(blah)\"]", "profiler.html", "localhost:8888", "http://localhost:8888/profiler.html", 4, 5, "localhost:8888", 8888],
];
+ /* eslint-enable max-len */
for (let i = 0; i < PARSED_CONTENT.length; i++) {
let parsed = parseLocation.apply(null, CONTENT_LOCATIONS[i]);
for (let j = 0; j < FIELDS.length; j++) {
- equal(parsed[FIELDS[j]], PARSED_CONTENT[i][j], `${CONTENT_LOCATIONS[i]} was parsed to correct ${FIELDS[j]}`);
+ equal(parsed[FIELDS[j]], PARSED_CONTENT[i][j],
+ `${CONTENT_LOCATIONS[i]} was parsed to correct ${FIELDS[j]}`);
}
}
const PARSED_CHROME = [
["Startup::XRE_InitChildProcess", null, null, null, 456, 123, null, null],
["chrome://browser/content/content.js", null, null, null, 456, 123, null, null],
["setTimeout_timer", "foo.js", null, "resource://gre/foo.js", 123, 434, null, null],
- ["hello/<.world (jar:file://Users/mcurie/Dev/jetpacks.js)", null, null, null, null, null, null, null],
+ ["hello/<.world (jar:file://Users/mcurie/Dev/jetpacks.js)", null, null, null,
+ null, null, null, null],
["hello/<.world", "baz.js", "bar", "http://bar/baz.js", 123, 987, "bar", null],
["EnterJIT", null, null, null, null, null, null, null],
];
for (let i = 0; i < PARSED_CHROME.length; i++) {
let parsed = parseLocation.apply(null, CHROME_LOCATIONS[i]);
for (let j = 0; j < FIELDS.length; j++) {
- equal(parsed[FIELDS[j]], PARSED_CHROME[i][j], `${CHROME_LOCATIONS[i]} was parsed to correct ${FIELDS[j]}`);
+ equal(parsed[FIELDS[j]], PARSED_CHROME[i][j],
+ `${CHROME_LOCATIONS[i]} was parsed to correct ${FIELDS[j]}`);
}
}
});
/**
* Takes either a string or an object and turns it into an array that
* parseLocation.apply expects.
*/
function argify(val) {
if (typeof val === "string") {
return [val];
- } else {
- return [val.location, val.line, val.column];
}
+ return [val.location, val.line, val.column];
}
/**
* Takes the result of argify and turns it into an array that can be passed to
* isContent.apply.
*/
function frameify(val) {
return [{ location: val[0] }];
--- a/devtools/client/performance/test/unit/test_frame-utils-02.js
+++ b/devtools/client/performance/test/unit/test_frame-utils-02.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests the function testing whether or not a frame is content or chrome
* works properly.
*/
function run_test() {
run_next_test();
--- a/devtools/client/performance/test/unit/test_jit-graph-data.js
+++ b/devtools/client/performance/test/unit/test_jit-graph-data.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Unit test for `createTierGraphDataFromFrameNode` function.
*/
function run_test() {
run_next_test();
}
@@ -24,55 +25,63 @@ add_task(function test() {
// Select the second half of the set of samples
let startTime = (SAMPLE_COUNT / 2 * TIME_PER_SAMPLE) - TIME_OFFSET;
let endTime = (SAMPLE_COUNT * TIME_PER_SAMPLE) - TIME_OFFSET;
let invertTree = true;
let root = new ThreadNode(gThread, { invertTree, startTime, endTime });
- equal(root.samples, SAMPLE_COUNT / 2, "root has correct amount of samples");
- equal(root.sampleTimes.length, SAMPLE_COUNT / 2, "root has correct amount of sample times");
+ equal(root.samples, SAMPLE_COUNT / 2,
+ "root has correct amount of samples");
+ equal(root.sampleTimes.length, SAMPLE_COUNT / 2,
+ "root has correct amount of sample times");
// Add time offset since the first sample begins TIME_OFFSET after startTime
- equal(root.sampleTimes[0], startTime + TIME_OFFSET, "root recorded first sample time in scope");
- equal(root.sampleTimes[root.sampleTimes.length - 1], endTime, "root recorded last sample time in scope");
+ equal(root.sampleTimes[0], startTime + TIME_OFFSET,
+ "root recorded first sample time in scope");
+ equal(root.sampleTimes[root.sampleTimes.length - 1], endTime,
+ "root recorded last sample time in scope");
let frame = getFrameNodePath(root, "X");
- let data = createTierGraphDataFromFrameNode(frame, root.sampleTimes, (endTime - startTime) / RESOLUTION);
+ let data = createTierGraphDataFromFrameNode(frame, root.sampleTimes,
+ (endTime - startTime) / RESOLUTION);
let TIME_PER_WINDOW = SAMPLE_COUNT / 2 / RESOLUTION * TIME_PER_SAMPLE;
// Filter out the dupes created with the same delta so the graph
// can render correctly.
let filteredData = [];
for (let i = 0; i < data.length; i++) {
if (!i || data[i].delta !== data[i - 1].delta) {
filteredData.push(data[i]);
}
}
data = filteredData;
for (let i = 0; i < 11; i++) {
- equal(data[i].delta, startTime + TIME_OFFSET + (TIME_PER_WINDOW * i), "first window has correct x");
+ equal(data[i].delta, startTime + TIME_OFFSET + (TIME_PER_WINDOW * i),
+ "first window has correct x");
equal(data[i].values[0], 0.2, "first window has 2 frames in interpreter");
equal(data[i].values[1], 0.2, "first window has 2 frames in baseline");
equal(data[i].values[2], 0.2, "first window has 2 frames in ion");
}
// Start on 11, since i===10 is where the values change, and the new value (0,0,0)
// is removed in `filteredData`
for (let i = 11; i < 20; i++) {
- equal(data[i].delta, startTime + TIME_OFFSET + (TIME_PER_WINDOW * i), "second window has correct x");
+ equal(data[i].delta, startTime + TIME_OFFSET + (TIME_PER_WINDOW * i),
+ "second window has correct x");
equal(data[i].values[0], 0, "second window observed no optimizations");
equal(data[i].values[1], 0, "second window observed no optimizations");
equal(data[i].values[2], 0, "second window observed no optimizations");
}
// Start on 21, since i===20 is where the values change, and the new value (0.3,0,0)
// is removed in `filteredData`
for (let i = 21; i < 30; i++) {
- equal(data[i].delta, startTime + TIME_OFFSET + (TIME_PER_WINDOW * i), "third window has correct x");
+ equal(data[i].delta, startTime + TIME_OFFSET + (TIME_PER_WINDOW * i),
+ "third window has correct x");
equal(data[i].values[0], 0.3, "third window has 3 frames in interpreter");
equal(data[i].values[1], 0, "third window has 0 frames in baseline");
equal(data[i].values[2], 0, "third window has 0 frames in ion");
}
});
var gUniqueStacks = new RecordingUtils.UniqueStacks();
@@ -132,17 +141,18 @@ var SAMPLES = (function () {
samples.push(createSample(i + j, pattern[j]));
}
i += 10;
}
return samples;
})();
-var gThread = RecordingUtils.deflateThread({ samples: SAMPLES, markers: [] }, gUniqueStacks);
+var gThread = RecordingUtils.deflateThread({ samples: SAMPLES, markers: [] },
+ gUniqueStacks);
var gRawSite1 = {
line: 12,
column: 2,
types: [{
mirType: uniqStr("Object"),
site: uniqStr("B (http://foo/bar:10)"),
typeset: [{
--- a/devtools/client/performance/test/unit/test_jit-model-01.js
+++ b/devtools/client/performance/test/unit/test_jit-model-01.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests that JITOptimizations track optimization sites and create
* an OptimizationSiteProfile when adding optimization sites, like from the
* FrameNode, and the returning of that data is as expected.
*/
function run_test() {
--- a/devtools/client/performance/test/unit/test_jit-model-02.js
+++ b/devtools/client/performance/test/unit/test_jit-model-02.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests that JITOptimizations create OptimizationSites, and the underlying
* hasSuccessfulOutcome/isSuccessfulOutcome work as intended.
*/
function run_test() {
run_next_test();
@@ -24,29 +25,38 @@ add_task(function test() {
rawSites.push(gRawSite3);
let jit = new JITOptimizations(rawSites, gStringTable.stringTable);
let sites = jit.optimizationSites;
let [first, second, third] = sites;
/* hasSuccessfulOutcome */
- equal(hasSuccessfulOutcome(first), false, "hasSuccessfulOutcome() returns expected (1)");
- equal(hasSuccessfulOutcome(second), true, "hasSuccessfulOutcome() returns expected (2)");
- equal(hasSuccessfulOutcome(third), true, "hasSuccessfulOutcome() returns expected (3)");
+ equal(hasSuccessfulOutcome(first), false,
+ "hasSuccessfulOutcome() returns expected (1)");
+ equal(hasSuccessfulOutcome(second), true,
+ "hasSuccessfulOutcome() returns expected (2)");
+ equal(hasSuccessfulOutcome(third), true,
+ "hasSuccessfulOutcome() returns expected (3)");
/* .data.attempts */
- equal(first.data.attempts.length, 2, "optSite.data.attempts has the correct amount of attempts (1)");
- equal(second.data.attempts.length, 5, "optSite.data.attempts has the correct amount of attempts (2)");
- equal(third.data.attempts.length, 3, "optSite.data.attempts has the correct amount of attempts (3)");
+ equal(first.data.attempts.length, 2,
+ "optSite.data.attempts has the correct amount of attempts (1)");
+ equal(second.data.attempts.length, 5,
+ "optSite.data.attempts has the correct amount of attempts (2)");
+ equal(third.data.attempts.length, 3,
+ "optSite.data.attempts has the correct amount of attempts (3)");
/* .data.types */
- equal(first.data.types.length, 1, "optSite.data.types has the correct amount of IonTypes (1)");
- equal(second.data.types.length, 2, "optSite.data.types has the correct amount of IonTypes (2)");
- equal(third.data.types.length, 1, "optSite.data.types has the correct amount of IonTypes (3)");
+ equal(first.data.types.length, 1,
+ "optSite.data.types has the correct amount of IonTypes (1)");
+ equal(second.data.types.length, 2,
+ "optSite.data.types has the correct amount of IonTypes (2)");
+ equal(third.data.types.length, 1,
+ "optSite.data.types has the correct amount of IonTypes (3)");
/* isSuccessfulOutcome */
ok(SUCCESSFUL_OUTCOMES.length, "Have some successful outcomes in SUCCESSFUL_OUTCOMES");
SUCCESSFUL_OUTCOMES.forEach(outcome =>
ok(isSuccessfulOutcome(outcome),
`${outcome} considered a successful outcome via isSuccessfulOutcome()`));
});
--- a/devtools/client/performance/test/unit/test_marker-blueprint.js
+++ b/devtools/client/performance/test/unit/test_marker-blueprint.js
@@ -1,11 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
-
+"use strict";
/**
* Tests if the timeline blueprint has a correct structure.
*/
function run_test() {
run_next_test();
}
@@ -13,17 +13,17 @@ add_task(function () {
let { TIMELINE_BLUEPRINT } = require("devtools/client/performance/modules/markers");
ok(TIMELINE_BLUEPRINT,
"A timeline blueprint should be available.");
ok(Object.keys(TIMELINE_BLUEPRINT).length,
"The timeline blueprint has at least one entry.");
- for (let [key, value] of Iterator(TIMELINE_BLUEPRINT)) {
+ for (let [, value] of Iterator(TIMELINE_BLUEPRINT)) {
ok("group" in value,
"Each entry in the timeline blueprint contains a `group` key.");
ok("colorName" in value,
"Each entry in the timeline blueprint contains a `colorName` key.");
ok("label" in value,
"Each entry in the timeline blueprint contains a `label` key.");
}
});
--- a/devtools/client/performance/test/unit/test_marker-utils.js
+++ b/devtools/client/performance/test/unit/test_marker-utils.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests the marker utils methods.
*/
function run_test() {
run_next_test();
}
@@ -13,89 +14,102 @@ add_task(function () {
let { TIMELINE_BLUEPRINT } = require("devtools/client/performance/modules/markers");
let { PREFS } = require("devtools/client/performance/modules/global");
let { MarkerBlueprintUtils } = require("devtools/client/performance/modules/marker-blueprint-utils");
PREFS.registerObserver();
Services.prefs.setBoolPref(PLATFORM_DATA_PREF, false);
- equal(MarkerBlueprintUtils.getMarkerLabel({ name: "DOMEvent" }), "DOM Event",
+ equal(MarkerBlueprintUtils.getMarkerLabel(
+ { name: "DOMEvent" }), "DOM Event",
"getMarkerLabel() returns a simple label");
- equal(MarkerBlueprintUtils.getMarkerLabel({ name: "Javascript", causeName: "setTimeout handler" }), "setTimeout",
+ equal(MarkerBlueprintUtils.getMarkerLabel(
+ { name: "Javascript", causeName: "setTimeout handler" }), "setTimeout",
"getMarkerLabel() returns a label defined via function");
- equal(MarkerBlueprintUtils.getMarkerLabel({ name: "GarbageCollection", causeName: "ALLOC_TRIGGER" }), "Incremental GC",
+ equal(MarkerBlueprintUtils.getMarkerLabel(
+ { name: "GarbageCollection", causeName: "ALLOC_TRIGGER" }), "Incremental GC",
"getMarkerLabel() returns a label for a function that is generalizable");
ok(MarkerBlueprintUtils.getMarkerFields({ name: "Paint" }).length === 0,
"getMarkerFields() returns an empty array when no fields defined");
- let fields = MarkerBlueprintUtils.getMarkerFields({ name: "ConsoleTime", causeName: "snowstorm" });
- equal(fields[0].label, "Timer Name:", "getMarkerFields() returns an array with proper label");
- equal(fields[0].value, "snowstorm", "getMarkerFields() returns an array with proper value");
+ let fields = MarkerBlueprintUtils.getMarkerFields(
+ { name: "ConsoleTime", causeName: "snowstorm" });
+ equal(fields[0].label, "Timer Name:",
+ "getMarkerFields() returns an array with proper label");
+ equal(fields[0].value, "snowstorm",
+ "getMarkerFields() returns an array with proper value");
fields = MarkerBlueprintUtils.getMarkerFields({ name: "DOMEvent", type: "mouseclick" });
- equal(fields.length, 1, "getMarkerFields() ignores fields that are not found on marker");
- equal(fields[0].label, "Event Type:", "getMarkerFields() returns an array with proper label");
- equal(fields[0].value, "mouseclick", "getMarkerFields() returns an array with proper value");
+ equal(fields.length, 1,
+ "getMarkerFields() ignores fields that are not found on marker");
+ equal(fields[0].label, "Event Type:",
+ "getMarkerFields() returns an array with proper label");
+ equal(fields[0].value, "mouseclick",
+ "getMarkerFields() returns an array with proper value");
- fields = MarkerBlueprintUtils.getMarkerFields({ name: "DOMEvent", eventPhase: Ci.nsIDOMEvent.AT_TARGET, type: "mouseclick" });
- equal(fields.length, 2, "getMarkerFields() returns multiple fields when using a fields function");
- equal(fields[0].label, "Event Type:", "getMarkerFields() correctly returns fields via function (1)");
- equal(fields[0].value, "mouseclick", "getMarkerFields() correctly returns fields via function (2)");
- equal(fields[1].label, "Phase:", "getMarkerFields() correctly returns fields via function (3)");
- equal(fields[1].value, "Target", "getMarkerFields() correctly returns fields via function (4)");
+ fields = MarkerBlueprintUtils.getMarkerFields(
+ { name: "DOMEvent", eventPhase: Ci.nsIDOMEvent.AT_TARGET, type: "mouseclick" });
+ equal(fields.length, 2,
+ "getMarkerFields() returns multiple fields when using a fields function");
+ equal(fields[0].label, "Event Type:",
+ "getMarkerFields() correctly returns fields via function (1)");
+ equal(fields[0].value, "mouseclick",
+ "getMarkerFields() correctly returns fields via function (2)");
+ equal(fields[1].label, "Phase:",
+ "getMarkerFields() correctly returns fields via function (3)");
+ equal(fields[1].value, "Target",
+ "getMarkerFields() correctly returns fields via function (4)");
- fields = MarkerBlueprintUtils.getMarkerFields({ name: "GarbageCollection", causeName: "ALLOC_TRIGGER" });
+ fields = MarkerBlueprintUtils.getMarkerFields(
+ { name: "GarbageCollection", causeName: "ALLOC_TRIGGER" });
equal(fields[0].value, "Too Many Allocations", "Uses L10N for GC reasons");
- fields = MarkerBlueprintUtils.getMarkerFields({ name: "GarbageCollection", causeName: "NOT_A_GC_REASON" });
- equal(fields[0].value, "NOT_A_GC_REASON", "Defaults to enum for GC reasons when not L10N'd");
+ fields = MarkerBlueprintUtils.getMarkerFields(
+ { name: "GarbageCollection", causeName: "NOT_A_GC_REASON" });
+ equal(fields[0].value, "NOT_A_GC_REASON",
+ "Defaults to enum for GC reasons when not L10N'd");
- equal(MarkerBlueprintUtils.getMarkerFields({ name: "Javascript", causeName: "Some Platform Field" })[0].value, "(Gecko)",
+ equal(MarkerBlueprintUtils.getMarkerFields(
+ { name: "Javascript", causeName: "Some Platform Field" })[0].value, "(Gecko)",
"Correctly obfuscates JS markers when platform data is off.");
Services.prefs.setBoolPref(PLATFORM_DATA_PREF, true);
- equal(MarkerBlueprintUtils.getMarkerFields({ name: "Javascript", causeName: "Some Platform Field" })[0].value, "Some Platform Field",
+ equal(MarkerBlueprintUtils.getMarkerFields(
+ { name: "Javascript", causeName: "Some Platform Field" })[0].value,
+ "Some Platform Field",
"Correctly deobfuscates JS markers when platform data is on.");
equal(MarkerBlueprintUtils.getMarkerGenericName("Javascript"), "Function Call",
"getMarkerGenericName() returns correct string when defined via function");
- equal(MarkerBlueprintUtils.getMarkerGenericName("GarbageCollection"), "Garbage Collection",
+ equal(MarkerBlueprintUtils.getMarkerGenericName("GarbageCollection"),
+ "Garbage Collection",
"getMarkerGenericName() returns correct string when defined via function");
equal(MarkerBlueprintUtils.getMarkerGenericName("Reflow"), "Layout",
"getMarkerGenericName() returns correct string when defined via string");
- TIMELINE_BLUEPRINT["fakemarker"] = { group: 0 };
+ TIMELINE_BLUEPRINT.fakemarker = { group: 0 };
try {
MarkerBlueprintUtils.getMarkerGenericName("fakemarker");
ok(false, "getMarkerGenericName() should throw when no label on blueprint.");
} catch (e) {
ok(true, "getMarkerGenericName() should throw when no label on blueprint.");
}
- TIMELINE_BLUEPRINT["fakemarker"] = { group: 0, label: () => void 0 };
+ TIMELINE_BLUEPRINT.fakemarker = { group: 0, label: () => void 0 };
try {
MarkerBlueprintUtils.getMarkerGenericName("fakemarker");
- ok(false, "getMarkerGenericName() should throw when label function returnd undefined.");
+ ok(false,
+ "getMarkerGenericName() should throw when label function returnd undefined.");
} catch (e) {
- ok(true, "getMarkerGenericName() should throw when label function returnd undefined.");
+ ok(true,
+ "getMarkerGenericName() should throw when label function returnd undefined.");
}
- delete TIMELINE_BLUEPRINT["fakemarker"];
-
- let customBlueprint = {
- UNKNOWN: {
- group: 1,
- label: "MyDefault"
- },
- custom: {
- group: 0,
- label: "MyCustom"
- }
- };
+ delete TIMELINE_BLUEPRINT.fakemarker;
equal(MarkerBlueprintUtils.getBlueprintFor({ name: "Reflow" }).label, "Layout",
"getBlueprintFor() should return marker def for passed in marker.");
equal(MarkerBlueprintUtils.getBlueprintFor({ name: "Not sure!" }).label(), "Unknown",
"getBlueprintFor() should return a default marker def if the marker is undefined.");
PREFS.unregisterObserver();
});
--- a/devtools/client/performance/test/unit/test_perf-utils-allocations-to-samples.js
+++ b/devtools/client/performance/test/unit/test_perf-utils-allocations-to-samples.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests if allocations data received from the performance actor is properly
* converted to something that follows the same structure as the samples data
* received from the profiler.
*/
function run_test() {
@@ -39,16 +40,17 @@ var TEST_DATA = {
line: 5,
column: 6,
functionDisplayName: null,
parent: 2
}
]
};
+/* eslint-disable no-inline-comments */
var EXPECTED_OUTPUT = {
name: "allocations",
samples: {
"schema": {
"stack": 0,
"time": 1,
"size": 2,
},
@@ -86,8 +88,9 @@ var EXPECTED_OUTPUT = {
]
},
"stringTable": [
"x (A:1:2)",
"y (B:3:4)",
"C:5:6"
],
};
+/* eslint-enable no-inline-comments */
--- a/devtools/client/performance/test/unit/test_profiler-categories.js
+++ b/devtools/client/performance/test/unit/test_profiler-categories.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests if the profiler categories are mapped correctly.
*/
function run_test() {
run_next_test();
}
@@ -21,14 +22,17 @@ add_task(function () {
"All categories have an associated color.");
ok(CATEGORIES.every(e => e.label),
"All categories have an associated label.");
ok(CATEGORIES.every(e => e.label === L10N.getStr("category." + e.abbrev)),
"All categories have a correctly localized label.");
- ok(Object.keys(CATEGORY_MAPPINGS).every(e => (Number(e) >= 9000 && Number(e) <= 9999) || Number.isInteger(Math.log2(e))),
- "All bitmask mappings keys are powers of 2, or between 9000-9999 for special categories.");
+ ok(Object.keys(CATEGORY_MAPPINGS).every(e => (Number(e) >= 9000 && Number(e) <= 9999) ||
+ Number.isInteger(Math.log2(e))),
+ "All bitmask mappings keys are powers of 2, or between 9000-9999 for special " +
+ "categories.");
- ok(Object.keys(CATEGORY_MAPPINGS).every(e => CATEGORIES.indexOf(CATEGORY_MAPPINGS[e]) !== -1),
+ ok(Object.keys(CATEGORY_MAPPINGS).every(e => CATEGORIES.indexOf(CATEGORY_MAPPINGS[e])
+ !== -1),
"All bitmask mappings point to a category.");
});
--- a/devtools/client/performance/test/unit/test_tree-model-01.js
+++ b/devtools/client/performance/test/unit/test_tree-model-01.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests if a call tree model can be correctly computed from a samples array.
*/
function run_test() {
run_next_test();
}
@@ -61,27 +62,30 @@ add_task(function test() {
"The 'A > B > C' node has a 'D' child call.");
equal(getFrameNodePath(root, "A > B > C > D").calls.length, 1,
"The correct number of child calls were calculated for the 'A > B > C > D' node.");
ok(getFrameNodePath(root, "A > B > C > D > E"),
"The 'A > B > C > D' node has a 'E' child call.");
equal(getFrameNodePath(root, "A > B > C > D > E").calls.length, 1,
- "The correct number of child calls were calculated for the 'A > B > C > D > E' node.");
+ "The correct number of child calls were calculated for the 'A > B > C > D > E' " +
+ "node.");
ok(getFrameNodePath(root, "A > B > C > D > E > F"),
"The 'A > B > C > D > E' node has a 'F' child call.");
equal(getFrameNodePath(root, "A > B > C > D > E > F").calls.length, 1,
- "The correct number of child calls were calculated for the 'A > B > C > D > E > F' node.");
+ "The correct number of child calls were calculated for the 'A > B > C > D > E > F' " +
+ "node.");
ok(getFrameNodePath(root, "A > B > C > D > E > F > G"),
"The 'A > B > C > D > E > F' node has a 'G' child call.");
equal(getFrameNodePath(root, "A > B > C > D > E > F > G").calls.length, 0,
- "The correct number of child calls were calculated for the 'A > B > C > D > E > F > G' node.");
+ "The correct number of child calls were calculated for the " +
+ "'A > B > C > D > E > F > G' node.");
equal(getFrameNodePath(root, "A > B > D").calls.length, 0,
"The correct number of child calls were calculated for the 'A > B > D' node.");
equal(getFrameNodePath(root, "A > E > F").calls.length, 0,
"The correct number of child calls were calculated for the 'A > E > F' node.");
// Check the location, sample times, and samples of the root.
equal(getFrameNodePath(root, "A").location, "A",
@@ -108,17 +112,18 @@ add_task(function test() {
// ...and the leftmost leaf.
equal(getFrameNodePath(root, "A > B > C > D > E > F > G").location, "G",
"The 'A > B > C > D > E > F > G' node has the correct location.");
equal(getFrameNodePath(root, "A > B > C > D > E > F > G").samples, 1,
"The 'A > B > C > D > E > F > G' node has the correct number of samples.");
equal(getFrameNodePath(root, "A > B > C > D > E > F > G").youngestFrameSamples, 1,
- "The 'A > B > C > D > E > F > G' node has the correct number of youngestFrameSamples.");
+ "The 'A > B > C > D > E > F > G' node has the correct number of " +
+ "youngestFrameSamples.");
});
var gThread = synthesizeProfileForTest([{
time: 5,
frames: [
{ location: "(root)" },
{ location: "A" },
{ location: "B" },
--- a/devtools/client/performance/test/unit/test_tree-model-02.js
+++ b/devtools/client/performance/test/unit/test_tree-model-02.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests if a call tree model ignores samples with no timing information.
*/
function run_test() {
run_next_test();
}
--- a/devtools/client/performance/test/unit/test_tree-model-03.js
+++ b/devtools/client/performance/test/unit/test_tree-model-03.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests if a call tree model can be correctly computed from a samples array,
* while at the same time filtering by duration.
*/
function run_test() {
run_next_test();
--- a/devtools/client/performance/test/unit/test_tree-model-04.js
+++ b/devtools/client/performance/test/unit/test_tree-model-04.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests if a call tree model can be correctly computed from a samples array,
* while at the same time filtering by duration and content-only frames.
*/
function run_test() {
run_next_test();
--- a/devtools/client/performance/test/unit/test_tree-model-05.js
+++ b/devtools/client/performance/test/unit/test_tree-model-05.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests if an inverted call tree model can be correctly computed from a samples
* array.
*/
var time = 1;
--- a/devtools/client/performance/test/unit/test_tree-model-06.js
+++ b/devtools/client/performance/test/unit/test_tree-model-06.js
@@ -1,24 +1,26 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests that when constructing FrameNodes, if optimization data is available,
* the FrameNodes have the correct optimization data after iterating over samples,
* and only youngest frames capture optimization data.
*/
function run_test() {
run_next_test();
}
add_task(function test() {
let { ThreadNode } = require("devtools/client/performance/modules/logic/tree-model");
- let root = getFrameNodePath(new ThreadNode(gThread, { startTime: 0, endTime: 30 }), "(root)");
+ let root = getFrameNodePath(new ThreadNode(gThread, { startTime: 0,
+ endTime: 30 }), "(root)");
let A = getFrameNodePath(root, "A");
let B = getFrameNodePath(A, "B");
let C = getFrameNodePath(B, "C");
let Aopts = A.getOptimizations();
let Bopts = B.getOptimizations();
let Copts = C.getOptimizations();
--- a/devtools/client/performance/test/unit/test_tree-model-07.js
+++ b/devtools/client/performance/test/unit/test_tree-model-07.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests that when displaying only content nodes, platform nodes are generalized.
*/
var { CATEGORY_MASK } = require("devtools/client/performance/modules/categories");
function run_test() {
@@ -12,17 +13,18 @@ function run_test() {
}
add_task(function test() {
let { ThreadNode } = require("devtools/client/performance/modules/logic/tree-model");
let url = (n) => `http://content/${n}`;
// Create a root node from a given samples array.
- let root = getFrameNodePath(new ThreadNode(gThread, { startTime: 5, endTime: 30, contentOnly: true }), "(root)");
+ let root = getFrameNodePath(new ThreadNode(gThread, { startTime: 5, endTime: 30,
+ contentOnly: true }), "(root)");
/*
* should have a tree like:
* root
* - (JS)
* - A
* - (GC)
* - B
@@ -33,24 +35,28 @@ add_task(function test() {
* - (JS)
*/
// Test the root node.
equal(root.calls.length, 2, "root has 2 children");
ok(getFrameNodePath(root, url("A")), "root has content child");
ok(getFrameNodePath(root, "64"), "root has platform generalized child");
- equal(getFrameNodePath(root, "64").calls.length, 0, "platform generalized child is a leaf.");
+ equal(getFrameNodePath(root, "64").calls.length, 0,
+ "platform generalized child is a leaf.");
- ok(getFrameNodePath(root, `${url("A")} > 128`), "A has platform generalized child of another type");
- equal(getFrameNodePath(root, `${url("A")} > 128`).calls.length, 0, "second generalized type is a leaf.");
+ ok(getFrameNodePath(root, `${url("A")} > 128`),
+ "A has platform generalized child of another type");
+ equal(getFrameNodePath(root, `${url("A")} > 128`).calls.length, 0,
+ "second generalized type is a leaf.");
ok(getFrameNodePath(root, `${url("A")} > ${url("E")} > ${url("F")} > 64`),
"a second leaf of the first generalized type exists deep in the tree.");
- ok(getFrameNodePath(root, `${url("A")} > 128`), "A has platform generalized child of another type");
+ ok(getFrameNodePath(root, `${url("A")} > 128`),
+ "A has platform generalized child of another type");
equal(getFrameNodePath(root, "64").category,
getFrameNodePath(root, `${url("A")} > ${url("E")} > ${url("F")} > 64`).category,
"generalized frames of same type are duplicated in top-down view");
});
var gThread = synthesizeProfileForTest([{
time: 5,
--- a/devtools/client/performance/test/unit/test_tree-model-08.js
+++ b/devtools/client/performance/test/unit/test_tree-model-08.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Verifies if FrameNodes retain and parse their data appropriately.
*/
function run_test() {
run_next_test();
}
@@ -60,19 +61,21 @@ add_task(function test() {
location: "main (http://localhost:8888/file.js:123:987)",
line: 123,
}), false),
new FrameNode("main (resource://devtools/timeline.js:123)", compute({
location: "main (resource://devtools/timeline.js:123)",
}), false),
];
- let fields = ["nodeType", "functionName", "fileName", "host", "url", "line", "column", "categoryData.abbrev", "isContent", "port"];
+ let fields = ["nodeType", "functionName", "fileName", "host", "url", "line", "column",
+ "categoryData.abbrev", "isContent", "port"];
let expected = [
- // nodeType, functionName, fileName, host, url, line, column, categoryData.abbrev, isContent, port
+ // nodeType, functionName, fileName, host, url, line, column, categoryData.abbrev,
+ // isContent, port
["Frame", "hello/<.world", "bar.js", "foo", "http://foo/bar.js", 123, 987, void 0, true],
["Frame", "hello/<.world", "bar.js", "foo", "http://foo/bar.js#baz", 123, 987, void 0, true],
["Frame", "hello/<.world", "/", "foo", "http://foo/#bar", 123, 987, void 0, true],
["Frame", "hello/<.world", "/", "foo", "http://foo/", 123, 987, void 0, true],
["Frame", "hello/<.world", "baz.js", "bar", "http://bar/baz.js", 123, 987, "other", false],
["Frame", "Foo::Bar::Baz", null, null, null, 456, void 0, "other", false],
["Frame", "EnterJIT", null, null, null, null, null, "js", false],
["Frame", "chrome://browser/content/content.js", null, null, null, 456, null, "other", false],
@@ -82,13 +85,15 @@ add_task(function test() {
];
for (let i = 0; i < frames.length; i++) {
let info = frames[i].getInfo();
let expect = expected[i];
for (let j = 0; j < fields.length; j++) {
let field = fields[j];
- let value = field === "categoryData.abbrev" ? info.categoryData.abbrev : info[field];
+ let value = field === "categoryData.abbrev"
+ ? info.categoryData.abbrev
+ : info[field];
equal(value, expect[j], `${field} for frame #${i} is correct: ${expect[j]}`);
}
}
});
--- a/devtools/client/performance/test/unit/test_tree-model-09.js
+++ b/devtools/client/performance/test/unit/test_tree-model-09.js
@@ -1,28 +1,28 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests that when displaying only content nodes, platform nodes are generalized.
*/
-var { CATEGORY_MASK } = require("devtools/client/performance/modules/categories");
-
function run_test() {
run_next_test();
}
add_task(function test() {
let { ThreadNode } = require("devtools/client/performance/modules/logic/tree-model");
let url = (n) => `http://content/${n}`;
// Create a root node from a given samples array.
- let root = getFrameNodePath(new ThreadNode(gThread, { startTime: 5, endTime: 25, contentOnly: true }), "(root)");
+ let root = getFrameNodePath(new ThreadNode(gThread, { startTime: 5, endTime: 25,
+ contentOnly: true }), "(root)");
/*
* should have a tree like:
* root
* - (Tools)
* - A
* - B
* - C
@@ -31,18 +31,20 @@ add_task(function test() {
* - F
* - (Tools)
*/
// Test the root node.
equal(root.calls.length, 2, "root has 2 children");
ok(getFrameNodePath(root, url("A")), "root has content child");
- ok(getFrameNodePath(root, "9000"), "root has platform generalized child from Chrome JS");
- equal(getFrameNodePath(root, "9000").calls.length, 0, "platform generalized child is a leaf.");
+ ok(getFrameNodePath(root, "9000"),
+ "root has platform generalized child from Chrome JS");
+ equal(getFrameNodePath(root, "9000").calls.length, 0,
+ "platform generalized child is a leaf.");
ok(getFrameNodePath(root, `${url("A")} > ${url("E")} > ${url("F")} > 9000`),
"a second leaf of the generalized Chrome JS exists.");
equal(getFrameNodePath(root, "9000").category,
getFrameNodePath(root, `${url("A")} > ${url("E")} > ${url("F")} > 9000`).category,
"generalized frames of same type are duplicated in top-down view");
});
--- a/devtools/client/performance/test/unit/test_tree-model-10.js
+++ b/devtools/client/performance/test/unit/test_tree-model-10.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests that the tree model calculates correct costs/percentages for
* frame nodes. The model-only version of browser_profiler-tree-view-10.js
*/
function run_test() {
run_next_test();
@@ -32,17 +33,18 @@ add_task(function () {
* | 40% | 40% | D
* | 40% | 0 | -> B
* | 40% | 0 | -> A
*
* | 10% | 10% | B
* | 10% | 0 | -> A
*/
- [ // total, self, name
+ [
+ // total, self, name
[ 50, 50, "C", [
[ 40, 0, "B", [
[ 30, 0, "A"]
]],
[ 10, 0, "A"]
]],
[ 40, 40, "D", [
[ 40, 0, "B", [
@@ -56,18 +58,20 @@ add_task(function () {
});
function compareFrameInfo(root, parent) {
parent = parent || root;
return function (def) {
let [total, self, name, children] = def;
let node = getFrameNodePath(parent, name);
let data = node.getInfo({ root });
- equal(total, data.totalPercentage, `${name} has correct total percentage: ${data.totalPercentage}`);
- equal(self, data.selfPercentage, `${name} has correct self percentage: ${data.selfPercentage}`);
+ equal(total, data.totalPercentage,
+ `${name} has correct total percentage: ${data.totalPercentage}`);
+ equal(self, data.selfPercentage,
+ `${name} has correct self percentage: ${data.selfPercentage}`);
if (children) {
children.forEach(compareFrameInfo(root, node));
}
};
}
var gThread = synthesizeProfileForTest([{
time: 5,
--- a/devtools/client/performance/test/unit/test_tree-model-11.js
+++ b/devtools/client/performance/test/unit/test_tree-model-11.js
@@ -1,52 +1,57 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests that the costs for recursive frames does not overcount the collapsed
* samples.
*/
function run_test() {
run_next_test();
}
add_task(function () {
let { ThreadNode } = require("devtools/client/performance/modules/logic/tree-model");
- let thread = new ThreadNode(gThread, { startTime: 0, endTime: 50, flattenRecursion: true });
+ let thread = new ThreadNode(gThread, { startTime: 0, endTime: 50,
+ flattenRecursion: true });
/**
* Samples
*
* A->B->C
* A->B->B->B->C
* A->B
* A->B->B->B
*/
- [ // total, self, name
+ [
+ // total, self, name
[ 100, 0, "(root)", [
[ 100, 0, "A", [
[ 100, 50, "B", [
[ 50, 50, "C"]
]]
]],
]],
].forEach(compareFrameInfo(thread));
});
function compareFrameInfo(root, parent) {
parent = parent || root;
return function (def) {
let [total, self, name, children] = def;
let node = getFrameNodePath(parent, name);
let data = node.getInfo({ root });
- equal(total, data.totalPercentage, `${name} has correct total percentage: ${data.totalPercentage}`);
- equal(self, data.selfPercentage, `${name} has correct self percentage: ${data.selfPercentage}`);
+ equal(total, data.totalPercentage,
+ `${name} has correct total percentage: ${data.totalPercentage}`);
+ equal(self, data.selfPercentage,
+ `${name} has correct self percentage: ${data.selfPercentage}`);
if (children) {
children.forEach(compareFrameInfo(root, node));
}
};
}
var gThread = synthesizeProfileForTest([{
time: 5,
--- a/devtools/client/performance/test/unit/test_tree-model-12.js
+++ b/devtools/client/performance/test/unit/test_tree-model-12.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
// Test that uninverting the call tree works correctly when there are stacks
// in the profile that prefixes of other stacks.
function run_test() {
run_next_test();
}
--- a/devtools/client/performance/test/unit/test_tree-model-13.js
+++ b/devtools/client/performance/test/unit/test_tree-model-13.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
// Like test_tree-model-12, but inverted.
function run_test() {
run_next_test();
}
add_task(function () {
--- a/devtools/client/performance/test/unit/test_tree-model-allocations-01.js
+++ b/devtools/client/performance/test/unit/test_tree-model-allocations-01.js
@@ -1,35 +1,37 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
-
+"use strict";
/**
* Tests that the tree model calculates correct costs/percentages for
* allocation frame nodes.
*/
function run_test() {
run_next_test();
}
add_task(function () {
let { ThreadNode } = require("devtools/client/performance/modules/logic/tree-model");
const { getProfileThreadFromAllocations } = require("devtools/shared/performance/recording-utils");
let allocationData = getProfileThreadFromAllocations(TEST_DATA);
let thread = new ThreadNode(allocationData, { startTime: 0, endTime: 1000 });
+ /* eslint-disable max-len */
/**
* Values are in order according to:
* +-------------+------------+-------------+-------------+------------------------------+
* | Self Bytes | Self Count | Total Bytes | Total Count | Function |
* +-------------+------------+-------------+-------------+------------------------------+
* | 1790272 41% | 8307 17% | 1790372 42% | 8317 18% | V someFunc @ a.j:345:6 |
* | 100 1% | 10 1% | 100 1% | 10 1% | > callerFunc @ b.j:765:34 |
* +-------------+------------+-------------+-------------+------------------------------+
*/
+ /* eslint-enable max-len */
[
[100, 10, 1, 33, 1000, 100, 3, 100, "x (A:1:2)", [
[200, 20, 1, 33, 900, 90, 2, 66, "y (B:3:4)", [
[700, 70, 1, 33, 700, 70, 1, 33, "z (C:5:6)"]
]]
]]
].forEach(compareFrameInfo(thread));
});
--- a/devtools/client/performance/test/unit/test_tree-model-allocations-02.js
+++ b/devtools/client/performance/test/unit/test_tree-model-allocations-02.js
@@ -1,35 +1,39 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests that the tree model calculates correct costs/percentages for
* allocation frame nodes. Inverted version of test_tree-model-allocations-01.js
*/
function run_test() {
run_next_test();
}
add_task(function () {
let { ThreadNode } = require("devtools/client/performance/modules/logic/tree-model");
const { getProfileThreadFromAllocations } = require("devtools/shared/performance/recording-utils");
let allocationData = getProfileThreadFromAllocations(TEST_DATA);
- let thread = new ThreadNode(allocationData, { invertTree: true, startTime: 0, endTime: 1000 });
+ let thread = new ThreadNode(allocationData, { invertTree: true, startTime: 0,
+ endTime: 1000 });
+ /* eslint-disable max-len */
/**
* Values are in order according to:
* +-------------+------------+-------------+-------------+------------------------------+
* | Self Bytes | Self Count | Total Bytes | Total Count | Function |
* +-------------+------------+-------------+-------------+------------------------------+
* | 1790272 41% | 8307 17% | 1790372 42% | 8317 18% | V someFunc @ a.j:345:6 |
* | 100 1% | 10 1% | 100 1% | 10 1% | > callerFunc @ b.j:765:34 |
* +-------------+------------+-------------+-------------+------------------------------+
*/
+ /* eslint-enable max-len */
[
[700, 70, 1, 33, 700, 70, 1, 33, "z (C:5:6)", [
[0, 0, 0, 0, 700, 70, 1, 33, "y (B:3:4)", [
[0, 0, 0, 0, 700, 70, 1, 33, "x (A:1:2)"]
]]
]],
[200, 20, 1, 33, 200, 20, 1, 33, "y (B:3:4)", [
[0, 0, 0, 0, 200, 20, 1, 33, "x (A:1:2)"]
--- a/devtools/client/performance/test/unit/test_waterfall-utils-collapse-01.js
+++ b/devtools/client/performance/test/unit/test_waterfall-utils-collapse-01.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests if the waterfall collapsing logic works properly.
*/
function run_test() {
run_next_test();
}
--- a/devtools/client/performance/test/unit/test_waterfall-utils-collapse-02.js
+++ b/devtools/client/performance/test/unit/test_waterfall-utils-collapse-02.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests if the waterfall collapsing logic works properly for console.time/console.timeEnd
* markers, as they should ignore any sort of collapsing.
*/
function run_test() {
run_next_test();
--- a/devtools/client/performance/test/unit/test_waterfall-utils-collapse-03.js
+++ b/devtools/client/performance/test/unit/test_waterfall-utils-collapse-03.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests that the waterfall collapsing works when atleast two
* collapsible markers downward, and the following marker is outside of both ranges.
*/
function run_test() {
run_next_test();
--- a/devtools/client/performance/test/unit/test_waterfall-utils-collapse-04.js
+++ b/devtools/client/performance/test/unit/test_waterfall-utils-collapse-04.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests if the waterfall collapsing logic works properly
* when filtering parents and children.
*/
function run_test() {
run_next_test();
--- a/devtools/client/performance/test/unit/test_waterfall-utils-collapse-05.js
+++ b/devtools/client/performance/test/unit/test_waterfall-utils-collapse-05.js
@@ -1,10 +1,11 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
/**
* Tests if the waterfall collapsing logic works properly
* when dealing with OTMT markers.
*/
function run_test() {
run_next_test();