OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 TestStorageMonitor::Destroy(); | 81 TestStorageMonitor::Destroy(); |
82 TestPortableDeviceWatcherWin* portable_device_watcher = | 82 TestPortableDeviceWatcherWin* portable_device_watcher = |
83 new TestPortableDeviceWatcherWin; | 83 new TestPortableDeviceWatcherWin; |
84 TestVolumeMountWatcherWin* mount_watcher = new TestVolumeMountWatcherWin; | 84 TestVolumeMountWatcherWin* mount_watcher = new TestVolumeMountWatcherWin; |
85 portable_device_watcher->set_use_dummy_mtp_storage_info(true); | 85 portable_device_watcher->set_use_dummy_mtp_storage_info(true); |
86 scoped_ptr<TestStorageMonitorWin> monitor( | 86 scoped_ptr<TestStorageMonitorWin> monitor( |
87 new TestStorageMonitorWin(mount_watcher, portable_device_watcher)); | 87 new TestStorageMonitorWin(mount_watcher, portable_device_watcher)); |
88 TestingBrowserProcess* browser_process = TestingBrowserProcess::GetGlobal(); | 88 TestingBrowserProcess* browser_process = TestingBrowserProcess::GetGlobal(); |
89 DCHECK(browser_process); | 89 DCHECK(browser_process); |
90 monitor_ = monitor.get(); | 90 monitor_ = monitor.get(); |
91 StorageMonitor::SetStorageMonitorForTesting(monitor.Pass()); | 91 StorageMonitor::SetStorageMonitorForTesting(monitor.PassAs<StorageMonitor>()); |
92 | 92 |
93 base::RunLoop runloop; | 93 base::RunLoop runloop; |
94 browser_process->media_file_system_registry()->GetPreferences(profile())-> | 94 browser_process->media_file_system_registry()->GetPreferences(profile())-> |
95 EnsureInitialized(runloop.QuitClosure()); | 95 EnsureInitialized(runloop.QuitClosure()); |
96 runloop.Run(); | 96 runloop.Run(); |
97 | 97 |
98 extensions::TestExtensionSystem* extension_system( | 98 extensions::TestExtensionSystem* extension_system( |
99 static_cast<extensions::TestExtensionSystem*>( | 99 static_cast<extensions::TestExtensionSystem*>( |
100 extensions::ExtensionSystem::Get(profile()))); | 100 extensions::ExtensionSystem::Get(profile()))); |
101 extension_system->CreateExtensionService( | 101 extension_system->CreateExtensionService( |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) { | 173 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) { |
174 MediaFileSystemInfo info = i->second; | 174 MediaFileSystemInfo info = i->second; |
175 if (info.path == location) { | 175 if (info.path == location) { |
176 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true); | 176 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true); |
177 checked = true; | 177 checked = true; |
178 break; | 178 break; |
179 } | 179 } |
180 } | 180 } |
181 EXPECT_TRUE(checked); | 181 EXPECT_TRUE(checked); |
182 } | 182 } |
OLD | NEW |