Commit 86853094 authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Chromium LUCI CQ

Files app: Preparation to enable JS modules for background page

Remove unnecessary import for MockEntry.

Add metrics to test_util_base to expose to runtime_loaded_test_util.js.

Bug: 1133186
Change-Id: I2bb6143d5670d6096b88ba8345af847a726404fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2613844
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarJeremie Boulic <jboulic@chromium.org>
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840936}
parent 1857ce50
...@@ -127,6 +127,7 @@ preprocess_if_expr("preprocess_generated") { ...@@ -127,6 +127,7 @@ preprocess_if_expr("preprocess_generated") {
"file_manager/common/js/file_type.m.js", "file_manager/common/js/file_type.m.js",
"file_manager/common/js/files_app_entry_types.m.js", "file_manager/common/js/files_app_entry_types.m.js",
"file_manager/common/js/lru_cache.m.js", "file_manager/common/js/lru_cache.m.js",
"file_manager/common/js/metrics.m.js",
"file_manager/common/js/metrics_base.m.js", "file_manager/common/js/metrics_base.m.js",
# Externs: # Externs:
......
...@@ -592,7 +592,6 @@ js_library("file_operation_manager.m") { ...@@ -592,7 +592,6 @@ js_library("file_operation_manager.m") {
"//ui/file_manager/externs/background:file_operation_manager.m", "//ui/file_manager/externs/background:file_operation_manager.m",
"//ui/file_manager/file_manager/common/js:async_util.m", "//ui/file_manager/file_manager/common/js:async_util.m",
"//ui/file_manager/file_manager/common/js:file_operation_common.m", "//ui/file_manager/file_manager/common/js:file_operation_common.m",
"//ui/file_manager/file_manager/common/js:mock_entry.m",
"//ui/file_manager/file_manager/common/js:trash.m", "//ui/file_manager/file_manager/common/js:trash.m",
"//ui/file_manager/file_manager/common/js:util.m", "//ui/file_manager/file_manager/common/js:util.m",
"//ui/webui/resources/js:assert.m", "//ui/webui/resources/js:assert.m",
...@@ -1035,6 +1034,12 @@ js_library("test_util_base") { ...@@ -1035,6 +1034,12 @@ js_library("test_util_base") {
js_library("test_util_base.m") { js_library("test_util_base.m") {
visibility += related_apps visibility += related_apps
sources = [ "$root_gen_dir/ui/file_manager/file_manager/background/js/test_util_base.m.js" ] sources = [ "$root_gen_dir/ui/file_manager/file_manager/background/js/test_util_base.m.js" ]
deps = [
"//ui/file_manager/base/js:volume_manager_types.m",
"//ui/file_manager/file_manager/common/js:metrics.m",
"//ui/file_manager/file_manager/common/js:util.m",
"//ui/webui/resources/js:assert.m",
]
extra_deps = [ ":modulize" ] extra_deps = [ ":modulize" ]
} }
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
// #import {FakeEntry} from '../../../externs/files_app_entry_interfaces.m.js'; // #import {FakeEntry} from '../../../externs/files_app_entry_interfaces.m.js';
// #import {VolumeManager} from '../../../externs/volume_manager.m.js'; // #import {VolumeManager} from '../../../externs/volume_manager.m.js';
// #import {EntryLocation} from '../../../externs/entry_location.m.js'; // #import {EntryLocation} from '../../../externs/entry_location.m.js';
// #import {MockEntry} from '../../common/js/mock_entry.m.js';
// #import {FileOperationManager} from '../../../externs/background/file_operation_manager.m.js'; // #import {FileOperationManager} from '../../../externs/background/file_operation_manager.m.js';
// #import {assert} from 'chrome://resources/js/assert.m.js'; // #import {assert} from 'chrome://resources/js/assert.m.js';
// #import {metadataProxy} from './metadata_proxy.m.js'; // #import {metadataProxy} from './metadata_proxy.m.js';
......
...@@ -8,8 +8,9 @@ ...@@ -8,8 +8,9 @@
*/ */
// clang-format off // clang-format off
// #import * as wrappedVolumeManagerCommon from '../../../base/js/volume_manager_types.m.js'; const {VolumeManagerCommon} = wrappedVolumeManagerCommon; // #import {VolumeManagerCommon} from '../../../base/js/volume_manager_types.m.js';
// #import * as wrappedUtil from '../../common/js/util.m.js'; const {util} = wrappedUtil; // #import {util} from '../../common/js/util.m.js';
// #import {metrics} from '../../common/js/metrics.m.js';
// #import {assert} from 'chrome://resources/js/assert.m.js'; // #import {assert} from 'chrome://resources/js/assert.m.js';
// clang-format on // clang-format on
...@@ -102,6 +103,7 @@ test.util.registerRemoteTestUtils = () => { ...@@ -102,6 +103,7 @@ test.util.registerRemoteTestUtils = () => {
window.VolumeManagerCommon = VolumeManagerCommon; window.VolumeManagerCommon = VolumeManagerCommon;
window.util = util; window.util = util;
window.assert = assert; window.assert = assert;
window.metrics = metrics;
// Asynchronously load the testing functions. // Asynchronously load the testing functions.
const script = document.createElement('script'); const script = document.createElement('script');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment