[legacy] Replace Root.* global usage with import

R=kprokopenko@chromium.org

Bug: 1442410
Change-Id: I1da51fd9367e91df1e761ed8457f5181460c2f17
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4821827
Auto-Submit: Simon Zünd <szuend@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
This commit is contained in:
Simon Zünd
2023-08-29 14:33:38 +00:00
committed by Devtools-frontend LUCI CQ
parent 83b93782c4
commit 182f077455
2 changed files with 7 additions and 1 deletions
+4
View File
@@ -43,6 +43,8 @@
let Common;
/** @type {import('./core/host/host.js')} */
let HostModule;
/** @type {import('./core/root/root.js')} */
let Root;
/** @type {import('./core/sdk/sdk.js')} */
let SDK;
/** @type {import('./panels/sources/sources.js')} */
@@ -163,6 +165,7 @@
([
Common,
HostModule,
Root,
SDK,
Sources,
Timeline,
@@ -172,6 +175,7 @@
await Promise.all([
self.runtime.loadLegacyModule('core/common/common.js'),
self.runtime.loadLegacyModule('core/host/host.js'),
self.runtime.loadLegacyModule('core/root/root.js'),
self.runtime.loadLegacyModule('core/sdk/sdk.js'),
self.runtime.loadLegacyModule('panels/sources/sources.js'),
self.runtime.loadLegacyModule('panels/timeline/timeline.js'),
@@ -4,6 +4,8 @@
// @ts-nocheck This file is not checked by TypeScript as it has a lot of legacy code.
import * as Platform from '../../core/platform/platform.js';
import * as Root from '../../core/root/root.js';
import * as TestRunner from './TestRunner.js';
self.Platform = self.Platform || {};
@@ -47,7 +49,7 @@ function _setupTestHelpers(target) {
}
export async function _executeTestScript() {
const testScriptURL = /** @type {string} */ (Root.Runtime.queryParam('test'));
const testScriptURL = /** @type {string} */ (Root.Runtime.Runtime.queryParam('test'));
if (TestRunner.isDebugTest()) {
/* eslint-disable no-console */
TestRunner.setInnerResult(console.log);