Commit 5e01981e authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

Closure compile media_import_handler_unittest

 - remove media_inport_handler_unittest.html
 - add BUILD rules to auto-generate and compile this unittest
 - define mockChrome, install it during the unittest
 - remove unused unittest vars and JS auto-format
 - document test fixtures and test helpers
 - fix Closure compile errors (there were lots).

No change in test behavior, no new tests.

Bug: 907970
Change-Id: Id90b4b1eaf84764521fb0d77aa2c29ff56db7c07
Reviewed-on: https://chromium-review.googlesource.com/c/1356728
Commit-Queue: Noel Gordon <noel@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612997}
parent d1df6533
......@@ -75,8 +75,7 @@ IN_PROC_BROWSER_TEST_F(FileManagerJsTest, LRUCacheTest) {
}
IN_PROC_BROWSER_TEST_F(FileManagerJsTest, MediaImportHandlerTest) {
RunTest(base::FilePath(
FILE_PATH_LITERAL("background/js/media_import_handler_unittest.html")));
RunGeneratedTest("/background/js/media_import_handler_unittest.html");
}
IN_PROC_BROWSER_TEST_F(FileManagerJsTest, TaskQueueTest) {
......
......@@ -334,6 +334,22 @@ js_library("media_import_handler") {
"../../common/js:importer_common",
"../../common/js:metrics",
]
externs_list = [ "//ui/file_manager/externs/background/import_runner.js" ]
}
js_unittest("media_import_handler_unittest") {
deps = [
":media_import_handler",
":mock_drive_sync_handler",
":mock_media_scanner",
":mock_progress_center",
":mock_volume_manager",
":test_import_history",
"//ui/file_manager/base/js:mock_chrome",
"//ui/file_manager/base/js:test_error_reporting",
"//ui/file_manager/file_manager/common/js:mock_entry",
"//ui/file_manager/file_manager/common/js:test_importer_common",
]
}
js_library("mock_media_scanner") {
......@@ -499,6 +515,7 @@ js_unit_tests("unit_tests") {
":file_operation_handler_unittest",
":file_operation_manager_unittest",
":import_history_unittest",
":media_import_handler_unittest",
":media_scanner_unittest",
":task_queue_unittest",
":volume_manager_unittest",
......
<!DOCTYPE html>
<!-- Copyright 2014 The Chromium Authors. All rights reserved.
-- Use of this source code is governed by a BSD-style license that can be
-- found in the LICENSE file.
-->
<html>
<body>
<script src="../../../../../ui/webui/resources/js/cr.js"></script>
<script src="../../../../../ui/webui/resources/js/assert.js"></script>
<script src="../../../../../ui/webui/resources/js/cr/event_target.js"></script>
<script src="../../../../../ui/webui/resources/js/cr/ui/array_data_model.js"></script>
<script src="../../../../../ui/webui/resources/js/load_time_data.js"></script>
<script src="../../common/js/async_util.js"></script>
<script src="../../common/js/metrics_base.js"></script>
<script src="../../common/js/mock_entry.js"></script>
<script src="../../../base/js/test_error_reporting.js"></script>
<script src="../../../base/js/mock_chrome.js"></script>
<script src="../../common/js/unittest_util.js"></script>
<script src="../../common/js/files_app_entry_types.js"></script>
<script src="../../common/js/util.js"></script>
<script src="../../../base/js/volume_manager_types.js"></script>
<script src="../../common/js/importer_common.js"></script>
<script src="../../common/js/test_importer_common.js"></script>
<script src="../../common/js/progress_center_common.js"></script>
<script src="drive_sync_handler.js"></script>
<script src="entry_location_impl.js"></script>
<script src="test_import_history.js"></script>
<script src="mock_drive_sync_handler.js"></script>
<script src="mock_progress_center.js"></script>
<script src="mock_media_scanner.js"></script>
<script src="task_queue.js"></script>
<script src="media_import_handler.js"></script>
<script src="duplicate_finder.js"></script>
<script src="volume_info_impl.js"></script>
<script src="volume_info_list_impl.js"></script>
<script src="volume_manager_factory.js"></script>
<script src="volume_manager_impl.js"></script>
<script src="volume_manager_util.js"></script>
<script src="mock_volume_manager.js"></script>
<script src="file_operation_util.js"></script>
<script src="media_import_handler_unittest.js"></script>
</body>
</html>
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