From 182f077455f89eb62a29cb0f2fc06be753a2f79d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Z=C3=BCnd?= Date: Tue, 29 Aug 2023 12:47:55 +0200 Subject: [PATCH] [legacy] Replace Root.* global usage with import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Commit-Queue: Kateryna Prokopenko Reviewed-by: Kateryna Prokopenko --- front_end/Tests.js | 4 ++++ front_end/legacy_test_runner/test_runner/test_runner.js | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/front_end/Tests.js b/front_end/Tests.js index 8eae23c8c7..c46c64e8fe 100644 --- a/front_end/Tests.js +++ b/front_end/Tests.js @@ -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'), diff --git a/front_end/legacy_test_runner/test_runner/test_runner.js b/front_end/legacy_test_runner/test_runner/test_runner.js index bc8e26d028..4c550bd068 100644 --- a/front_end/legacy_test_runner/test_runner/test_runner.js +++ b/front_end/legacy_test_runner/test_runner/test_runner.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);