Commit d96084d3 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

Closure compile file_operation_manager_unittest

 - remove file_operation_manager_unittest.html
 - add BUILD rules to auto-generate and compile this unittest
 - define mockChrome and install it in unittest Setup()
 - fix Closure compile errors

No change in test behavior, no new tests.

Bug: 907967
Change-Id: I523218dd179c5e9b0ae55b81d4a5480eea279f8c
Reviewed-on: https://chromium-review.googlesource.com/c/1352115Reviewed-by: default avatarStuart Langley <slangley@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611501}
parent c362c846
...@@ -39,8 +39,7 @@ IN_PROC_BROWSER_TEST_F(FileManagerJsTest, DeviceHandlerTest) { ...@@ -39,8 +39,7 @@ IN_PROC_BROWSER_TEST_F(FileManagerJsTest, DeviceHandlerTest) {
} }
IN_PROC_BROWSER_TEST_F(FileManagerJsTest, FileOperationManagerTest) { IN_PROC_BROWSER_TEST_F(FileManagerJsTest, FileOperationManagerTest) {
RunTest(base::FilePath( RunGeneratedTest("/background/js/file_operation_manager_unittest.html");
FILE_PATH_LITERAL("background/js/file_operation_manager_unittest.html")));
} }
IN_PROC_BROWSER_TEST_F(FileManagerJsTest, DriveSyncHandlerTest) { IN_PROC_BROWSER_TEST_F(FileManagerJsTest, DriveSyncHandlerTest) {
......
...@@ -242,6 +242,7 @@ js_library("mock_file_operation_manager") { ...@@ -242,6 +242,7 @@ js_library("mock_file_operation_manager") {
testonly = true testonly = true
deps = [ deps = [
":file_operation_manager", ":file_operation_manager",
"//ui/webui/resources/js/cr:event_target",
] ]
externs_list = [ "../../../externs/background/file_operation_manager.js" ] externs_list = [ "../../../externs/background/file_operation_manager.js" ]
} }
...@@ -253,6 +254,17 @@ js_library("file_operation_manager") { ...@@ -253,6 +254,17 @@ js_library("file_operation_manager") {
"//ui/webui/resources/js:cr", "//ui/webui/resources/js:cr",
"//ui/webui/resources/js/cr:event_target", "//ui/webui/resources/js/cr:event_target",
] ]
externs_list = [ "../../../externs/background/file_operation_manager.js" ]
}
js_unittest("file_operation_manager_unittest") {
deps = [
":file_operation_manager",
":metadata_proxy",
"//ui/file_manager/base/js:mock_chrome",
"//ui/file_manager/base/js:test_error_reporting",
"//ui/file_manager/file_manager/common/js:mock_entry",
]
} }
js_library("file_operation_util") { js_library("file_operation_util") {
...@@ -476,6 +488,7 @@ js_unit_tests("unit_tests") { ...@@ -476,6 +488,7 @@ js_unit_tests("unit_tests") {
":device_handler_unittest", ":device_handler_unittest",
":drive_sync_handler_unittest", ":drive_sync_handler_unittest",
":duplicate_finder_unittest", ":duplicate_finder_unittest",
":file_operation_manager_unittest",
":import_history_unittest", ":import_history_unittest",
":media_scanner_unittest", ":media_scanner_unittest",
":task_queue_unittest", ":task_queue_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/cr/event_target.js"></script>
<script src="../../common/js/async_util.js"></script>
<script src="../../../base/js/test_error_reporting.js"></script>
<script src="../../common/js/util.js"></script>
<script src="../../common/js/lru_cache.js"></script>
<script src="../../common/js/mock_entry.js"></script>
<script src="metadata_proxy.js"></script>
<script src="file_operation_manager.js"></script>
<script src="file_operation_util.js"></script>
<script src="file_operation_manager_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