Chromium Code Reviews| 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/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 779 std::set<std::string> gallery_names; | 779 std::set<std::string> gallery_names; |
| 780 InitForGalleryNamesTest(&gallery_names); | 780 InitForGalleryNamesTest(&gallery_names); |
| 781 | 781 |
| 782 for (std::set<std::string>::const_iterator it = gallery_names.begin(); | 782 for (std::set<std::string>::const_iterator it = gallery_names.begin(); |
| 783 it != gallery_names.end(); | 783 it != gallery_names.end(); |
| 784 ++it) { | 784 ++it) { |
| 785 CheckGalleryJSONName(*it, false /*not removable*/); | 785 CheckGalleryJSONName(*it, false /*not removable*/); |
| 786 } | 786 } |
| 787 } | 787 } |
| 788 | 788 |
| 789 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) | 789 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) && !defined(OS_WIN) |
|
kmadhusu
2013/01/11 19:01:59
On Windows, this test depends on RemovableDeviceN
| |
| 790 // TODO(kmadhusu) : On Windows, this test depends on | |
| 791 // RemovableDeviceNotificationsWindowWin to get the attached MTP device | |
| 792 // storage details. Enable this test after refactoring | |
| 793 // removable_device_notifications_window_win_unittest.cc to share the | |
| 794 // mock classes (TestRemovableDeviceNotificationsWindowWin, | |
| 795 // TestPortableDeviceWatcherWin and TestVolumeMountWatcherWin). | |
| 790 TEST_F(MediaFileSystemRegistryTest, GalleryNameMTP) { | 796 TEST_F(MediaFileSystemRegistryTest, GalleryNameMTP) { |
| 791 std::set<std::string> gallery_names; | 797 std::set<std::string> gallery_names; |
| 792 InitForGalleryNamesTest(&gallery_names); | 798 InitForGalleryNamesTest(&gallery_names); |
| 793 | 799 |
| 794 // TODO(port) On Windows, this is not an absolute path. | 800 // TODO(port) On Windows, this is not an absolute path. |
| 795 FilePath location(FILE_PATH_LITERAL("/mtp_bogus")); | 801 FilePath location(FILE_PATH_LITERAL("/mtp_bogus")); |
| 796 AttachDevice(MediaStorageUtil::MTP_OR_PTP, "mtp_fake_id", location); | 802 AttachDevice(MediaStorageUtil::MTP_OR_PTP, "mtp_fake_id", location); |
| 797 CheckNewGallery(GetProfileState(0U), gallery_names, true /*removable*/); | 803 CheckNewGallery(GetProfileState(0U), gallery_names, true /*removable*/); |
| 798 } | 804 } |
| 799 #endif | 805 #endif |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 842 SetGalleryPermission(profile_state, | 848 SetGalleryPermission(profile_state, |
| 843 profile_state->all_permission_extension(), | 849 profile_state->all_permission_extension(), |
| 844 device_id, | 850 device_id, |
| 845 true /*has access*/); | 851 true /*has access*/); |
| 846 CheckNewGallery(profile_state, gallery_names, false /*not removable*/); | 852 CheckNewGallery(profile_state, gallery_names, false /*not removable*/); |
| 847 } | 853 } |
| 848 | 854 |
| 849 } // namespace | 855 } // namespace |
| 850 | 856 |
| 851 } // namespace chrome | 857 } // namespace chrome |
| OLD | NEW |