| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // MediaFileSystemRegistry unit tests. | 5 // MediaFileSystemRegistry unit tests. |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 it != registry->extension_hosts_map_.end(); | 751 it != registry->extension_hosts_map_.end(); |
| 752 ++it) { | 752 ++it) { |
| 753 extension_galleries_host_count += it->second.size(); | 753 extension_galleries_host_count += it->second.size(); |
| 754 } | 754 } |
| 755 return extension_galleries_host_count; | 755 return extension_galleries_host_count; |
| 756 } | 756 } |
| 757 | 757 |
| 758 | 758 |
| 759 void MediaFileSystemRegistryTest::SetUp() { | 759 void MediaFileSystemRegistryTest::SetUp() { |
| 760 ChromeRenderViewHostTestHarness::SetUp(); | 760 ChromeRenderViewHostTestHarness::SetUp(); |
| 761 test::TestStorageMonitor::RemoveSingleton(); |
| 761 #if defined(OS_WIN) | 762 #if defined(OS_WIN) |
| 762 test::TestPortableDeviceWatcherWin* portable_device_watcher = | 763 test::TestPortableDeviceWatcherWin* portable_device_watcher = |
| 763 new test::TestPortableDeviceWatcherWin; | 764 new test::TestPortableDeviceWatcherWin; |
| 764 test::TestVolumeMountWatcherWin* mount_watcher = | 765 test::TestVolumeMountWatcherWin* mount_watcher = |
| 765 new test::TestVolumeMountWatcherWin; | 766 new test::TestVolumeMountWatcherWin; |
| 766 portable_device_watcher->set_use_dummy_mtp_storage_info(true); | 767 portable_device_watcher->set_use_dummy_mtp_storage_info(true); |
| 767 monitor_.reset(new test::TestStorageMonitorWin( | 768 monitor_.reset(new test::TestStorageMonitorWin( |
| 768 mount_watcher, portable_device_watcher)); | 769 mount_watcher, portable_device_watcher)); |
| 769 #else | 770 #else |
| 770 monitor_.reset(new test::TestStorageMonitor()); | 771 monitor_.reset(new test::TestStorageMonitor()); |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1062 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_VIDEOS, &path)); | 1063 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_VIDEOS, &path)); |
| 1063 profile_state->AddNameForAllCompare(path.BaseName().LossyDisplayName()); | 1064 profile_state->AddNameForAllCompare(path.BaseName().LossyDisplayName()); |
| 1064 | 1065 |
| 1065 profile_state->CheckGalleries("names-dir", one_expectation, auto_galleries); | 1066 profile_state->CheckGalleries("names-dir", one_expectation, auto_galleries); |
| 1066 } else { | 1067 } else { |
| 1067 profile_state->CheckGalleries("names", one_expectation, one_expectation); | 1068 profile_state->CheckGalleries("names", one_expectation, one_expectation); |
| 1068 } | 1069 } |
| 1069 } | 1070 } |
| 1070 | 1071 |
| 1071 } // namespace chrome | 1072 } // namespace chrome |
| OLD | NEW |