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 // chromeos::MediaDeviceNotifications unit tests. | 5 // chromeos::MediaDeviceNotifications unit tests. |
6 | 6 |
7 #include "chrome/browser/media_gallery/media_device_notifications_chromeos.h" | 7 #include "chrome/browser/media_gallery/media_device_notifications_chromeos.h" |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 const char kDevice1[] = "/dev/d1"; | 30 const char kDevice1[] = "/dev/d1"; |
31 const char kDevice2[] = "/dev/disk/d2"; | 31 const char kDevice2[] = "/dev/disk/d2"; |
32 const char kDevice1Name[] = "d1"; | 32 const char kDevice1Name[] = "d1"; |
33 const char kDevice2Name[] = "d2"; | 33 const char kDevice2Name[] = "d2"; |
34 const char kMountPointA[] = "mnt_a"; | 34 const char kMountPointA[] = "mnt_a"; |
35 const char kMountPointB[] = "mnt_b"; | 35 const char kMountPointB[] = "mnt_b"; |
36 | 36 |
37 std::string GetDCIMDeviceId(const std::string& unique_id) { | 37 std::string GetDCIMDeviceId(const std::string& unique_id) { |
38 return chrome::MediaStorageUtil::MakeDeviceId( | 38 return chrome::MediaStorageUtil::MakeDeviceId( |
39 chrome::MediaStorageUtil::USB_MASS_STORAGE_WITH_DCIM, unique_id); | 39 chrome::MediaStorageUtil::REMOVABLE_MASS_STORAGE_WITH_DCIM, unique_id); |
40 } | 40 } |
41 | 41 |
42 class MediaDeviceNotificationsTest : public testing::Test { | 42 class MediaDeviceNotificationsTest : public testing::Test { |
43 public: | 43 public: |
44 MediaDeviceNotificationsTest() | 44 MediaDeviceNotificationsTest() |
45 : ui_thread_(BrowserThread::UI, &ui_loop_), | 45 : ui_thread_(BrowserThread::UI, &ui_loop_), |
46 file_thread_(BrowserThread::FILE) { | 46 file_thread_(BrowserThread::FILE) { |
47 } | 47 } |
48 virtual ~MediaDeviceNotificationsTest() {} | 48 virtual ~MediaDeviceNotificationsTest() {} |
49 | 49 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // Unsupported file system. | 232 // Unsupported file system. |
233 mount_info.mount_type = MOUNT_TYPE_DEVICE; | 233 mount_info.mount_type = MOUNT_TYPE_DEVICE; |
234 mount_info.mount_condition = disks::MOUNT_CONDITION_UNSUPPORTED_FILESYSTEM; | 234 mount_info.mount_condition = disks::MOUNT_CONDITION_UNSUPPORTED_FILESYSTEM; |
235 EXPECT_CALL(observer(), OnRemovableStorageAttached(_, _, _)).Times(0); | 235 EXPECT_CALL(observer(), OnRemovableStorageAttached(_, _, _)).Times(0); |
236 MountDevice(MOUNT_ERROR_NONE, mount_info, kUniqueId); | 236 MountDevice(MOUNT_ERROR_NONE, mount_info, kUniqueId); |
237 } | 237 } |
238 | 238 |
239 } // namespace | 239 } // namespace |
240 | 240 |
241 } // namespace chrome | 241 } // namespace chrome |
OLD | NEW |