Bug 1678550 - [devtools] Use absolute paths in DAMP require calls r=perftest-reviewers,AlexandruIonescu,ochameau,nchevobbe

Depends on D97727

Similar to what was done for the devtools/ folder, we should use absolute paths in all our require calls.

Differential Revision: https://phabricator.services.mozilla.com/D97729
This commit is contained in:
Julian Descottes 2021-01-04 13:07:25 +00:00
Родитель d8c21acf2f
Коммит 0b41d10929
30 изменённых файлов: 57 добавлений и 42 удалений

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

@ -5,7 +5,7 @@
"use strict";
const Services = require("Services");
const { openToolboxAndLog, reloadPageAndLog } = require("../head");
const { openToolboxAndLog, reloadPageAndLog } = require("damp-test/tests/head");
const INITIALIZED_EVENT = "Accessibility:Initialized";

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

@ -7,14 +7,14 @@
const {
openAccessibilityAndLog,
shutdownAccessibilityService,
} = require("./accessibility-helpers");
} = require("damp-test/tests/accessibility/accessibility-helpers");
const {
closeToolbox,
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
} = require("damp-test/tests/head");
module.exports = async function() {
await testSetup(SIMPLE_URL);

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

@ -8,13 +8,13 @@ const {
openAccessibilityAndLog,
reloadAccessibilityAndLog,
shutdownAccessibilityService,
} = require("./accessibility-helpers");
} = require("damp-test/tests/accessibility/accessibility-helpers");
const {
closeToolboxAndLog,
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
} = require("damp-test/tests/head");
module.exports = async function() {
await testSetup(SIMPLE_URL);

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

@ -10,7 +10,7 @@ const {
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
} = require("damp-test/tests/head");
// This simple test is only called once using the flag coldRun
module.exports = async function() {

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

@ -4,14 +4,16 @@
"use strict";
const { reloadInspectorAndLog } = require("./inspector-helpers");
const {
reloadInspectorAndLog,
} = require("damp-test/tests/inspector/inspector-helpers");
const {
openToolboxAndLog,
closeToolboxAndLog,
testSetup,
testTeardown,
COMPLICATED_URL,
} = require("../head");
} = require("damp-test/tests/head");
module.exports = async function() {
await testSetup(COMPLICATED_URL);

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

@ -7,7 +7,7 @@
const {
reloadInspectorAndLog,
selectNodeFront,
} = require("./inspector-helpers");
} = require("damp-test/tests/inspector/inspector-helpers");
const {
closeToolboxAndLog,
garbageCollect,
@ -16,7 +16,7 @@ const {
testSetup,
testTeardown,
PAGES_BASE_URL,
} = require("../head");
} = require("damp-test/tests/head");
const { gDevTools } = require("devtools/client/framework/devtools");

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

@ -4,7 +4,7 @@
"use strict";
const { reloadPageAndLog } = require("../head");
const { reloadPageAndLog } = require("damp-test/tests/head");
exports.reloadInspectorAndLog = async function(label, toolbox) {
let onReload = async function() {

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

@ -13,7 +13,7 @@ const {
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
} = require("damp-test/tests/head");
module.exports = async function() {
let tab = await testSetup(SIMPLE_URL);

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

@ -11,7 +11,7 @@ const {
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
} = require("damp-test/tests/head");
/**
* Measure the time necessary to perform successive childList mutations in the content

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

@ -4,14 +4,16 @@
"use strict";
const { reloadInspectorAndLog } = require("./inspector-helpers");
const {
reloadInspectorAndLog,
} = require("damp-test/tests/inspector/inspector-helpers");
const {
openToolboxAndLog,
closeToolboxAndLog,
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
} = require("damp-test/tests/head");
module.exports = async function() {
await testSetup(SIMPLE_URL);

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

@ -10,7 +10,7 @@ const {
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
} = require("damp-test/tests/head");
module.exports = async function() {
await testSetup(SIMPLE_URL);

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

@ -11,12 +11,12 @@ const {
testSetup,
testTeardown,
COMPLICATED_URL,
} = require("../head");
} = require("damp-test/tests/head");
const {
exportHar,
waitForNetworkRequests,
openResponseDetailsPanel,
} = require("./netmonitor-helpers");
} = require("damp-test/tests/netmonitor/netmonitor-helpers");
const EXPECTED_REQUESTS = {
min: 230,

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

@ -6,7 +6,7 @@
const { EVENTS } = require("devtools/client/netmonitor/src/constants");
const Actions = require("devtools/client/netmonitor/src/actions/index");
const { getToolbox, runTest } = require("../head");
const { getToolbox, runTest } = require("damp-test/tests/head");
/**
* Start monitoring all incoming update events about network requests and wait until

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

@ -11,8 +11,11 @@ const {
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
const { exportHar, waitForNetworkRequests } = require("./netmonitor-helpers");
} = require("damp-test/tests/head");
const {
exportHar,
waitForNetworkRequests,
} = require("damp-test/tests/netmonitor/netmonitor-helpers");
const EXPECTED_REQUESTS = 1;

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

@ -6,7 +6,7 @@
const protocol = require("devtools/shared/protocol");
const { dampTestSpec } = require("./spec");
const { dampTestSpec } = require("damp-test/tests/server/spec");
exports.DampTestActor = protocol.ActorClassWithSpec(dampTestSpec, {
initialize(conn) {

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

@ -11,11 +11,11 @@ const {
testTeardown,
runTest,
SIMPLE_URL,
} = require("../head");
} = require("damp-test/tests/head");
const protocol = require("devtools/shared/protocol");
const { FrontClassWithSpec } = protocol;
const { dampTestSpec } = require("./spec");
const { dampTestSpec } = require("damp-test/tests/server/spec");
// Test parameters
const ATTRIBUTES = 10;

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

@ -11,7 +11,7 @@ const {
testSetup,
testTeardown,
COMPLICATED_URL,
} = require("../head");
} = require("damp-test/tests/head");
module.exports = async function() {
await testSetup(COMPLICATED_URL);

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

@ -11,7 +11,7 @@ const {
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
} = require("damp-test/tests/head");
module.exports = async function() {
await testSetup(SIMPLE_URL);

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

@ -12,7 +12,7 @@ const {
testSetup,
testTeardown,
PAGES_BASE_URL,
} = require("../head");
} = require("damp-test/tests/head");
module.exports = async function() {
await testSetup(PAGES_BASE_URL + "custom/panels-in-background/index.html");

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

@ -11,7 +11,7 @@ const {
testSetup,
testTeardown,
waitForTick,
} = require("../head");
} = require("damp-test/tests/head");
const TEST_NAME = "console.autocomplete";

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

@ -12,8 +12,10 @@ const {
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
const { waitForConsoleOutputChildListChange } = require("./webconsole-helpers");
} = require("damp-test/tests/head");
const {
waitForConsoleOutputChildListChange,
} = require("damp-test/tests/webconsole/webconsole-helpers");
module.exports = async function() {
let TOTAL_MESSAGES = 1000;

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

@ -10,7 +10,7 @@ const {
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
} = require("damp-test/tests/head");
module.exports = async function() {
await testSetup(SIMPLE_URL);

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

@ -11,8 +11,10 @@ const {
testSetup,
testTeardown,
COMPLICATED_URL,
} = require("../head");
const { reloadConsoleAndLog } = require("./webconsole-helpers");
} = require("damp-test/tests/head");
const {
reloadConsoleAndLog,
} = require("damp-test/tests/webconsole/webconsole-helpers");
const { AppConstants } = require("resource://gre/modules/AppConstants.jsm");
const EXPECTED_MESSAGES = [

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

@ -10,8 +10,10 @@ const {
testSetup,
testTeardown,
PAGES_BASE_URL,
} = require("../head");
const { reloadConsoleAndLog } = require("./webconsole-helpers");
} = require("damp-test/tests/head");
const {
reloadConsoleAndLog,
} = require("damp-test/tests/webconsole/webconsole-helpers");
const TEST_URL = PAGES_BASE_URL + "custom/console/index.html";

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

@ -12,7 +12,7 @@ const {
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
} = require("damp-test/tests/head");
module.exports = async function() {
let tab = await testSetup(SIMPLE_URL);

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

@ -10,7 +10,7 @@ const {
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
} = require("damp-test/tests/head");
const TOTAL_MESSAGES = 100;

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

@ -10,8 +10,10 @@ const {
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
const { reloadConsoleAndLog } = require("./webconsole-helpers");
} = require("damp-test/tests/head");
const {
reloadConsoleAndLog,
} = require("damp-test/tests/webconsole/webconsole-helpers");
const EXPECTED_MESSAGES = 1;

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

@ -11,7 +11,7 @@ const {
testSetup,
testTeardown,
SIMPLE_URL,
} = require("../head");
} = require("damp-test/tests/head");
// Log a stream of console messages, 1 per rAF. Then record the average
// time per rAF. The idea is that the console being slow can slow down

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

@ -11,7 +11,7 @@ const {
testSetup,
testTeardown,
waitForTick,
} = require("../head");
} = require("damp-test/tests/head");
const TEST_NAME = "console.typing";
const LOGS_NUMBER = 500;

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

@ -4,7 +4,7 @@
"use strict";
const { reloadPageAndLog } = require("../head");
const { reloadPageAndLog } = require("damp-test/tests/head");
/**
* @param {String} label: The name of the test.