| 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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 FSInfoMap galleries_info; | 816 FSInfoMap galleries_info; |
| 817 InitForGalleriesInfoTest(&galleries_info); | 817 InitForGalleriesInfoTest(&galleries_info); |
| 818 | 818 |
| 819 for (FSInfoMap::const_iterator it = galleries_info.begin(); | 819 for (FSInfoMap::const_iterator it = galleries_info.begin(); |
| 820 it != galleries_info.end(); | 820 it != galleries_info.end(); |
| 821 ++it) { | 821 ++it) { |
| 822 CheckGalleryJSONName(it->second.name, false /*not removable*/); | 822 CheckGalleryJSONName(it->second.name, false /*not removable*/); |
| 823 } | 823 } |
| 824 } | 824 } |
| 825 | 825 |
| 826 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) | 826 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) && !defined(OS_WIN) |
| 827 // TODO(kmadhusu) : On Windows, this test depends on |
| 828 // RemovableDeviceNotificationsWindowWin to get the attached MTP device |
| 829 // storage details. Enable this test after refactoring |
| 830 // removable_device_notifications_window_win_unittest.cc to share the |
| 831 // mock classes (TestRemovableDeviceNotificationsWindowWin, |
| 832 // TestPortableDeviceWatcherWin and TestVolumeMountWatcherWin). |
| 827 TEST_F(MediaFileSystemRegistryTest, GalleryNameMTP) { | 833 TEST_F(MediaFileSystemRegistryTest, GalleryNameMTP) { |
| 828 FSInfoMap galleries_info; | 834 FSInfoMap galleries_info; |
| 829 InitForGalleriesInfoTest(&galleries_info); | 835 InitForGalleriesInfoTest(&galleries_info); |
| 830 | 836 |
| 831 // TODO(port) On Windows, this is not an absolute path. | 837 // TODO(port) On Windows, this is not an absolute path. |
| 832 FilePath location(FILE_PATH_LITERAL("/mtp_bogus")); | 838 FilePath location(FILE_PATH_LITERAL("/mtp_bogus")); |
| 833 AttachDevice(MediaStorageUtil::MTP_OR_PTP, "mtp_fake_id", location); | 839 AttachDevice(MediaStorageUtil::MTP_OR_PTP, "mtp_fake_id", location); |
| 834 CheckNewGalleryInfo(GetProfileState(0U), galleries_info, location, | 840 CheckNewGalleryInfo(GetProfileState(0U), galleries_info, location, |
| 835 true /*removable*/, true /* media device */); | 841 true /*removable*/, true /* media device */); |
| 836 } | 842 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 profile_state->all_permission_extension(), | 889 profile_state->all_permission_extension(), |
| 884 device_id, | 890 device_id, |
| 885 true /*has access*/); | 891 true /*has access*/); |
| 886 CheckNewGalleryInfo(profile_state, galleries_info, empty_dir(), | 892 CheckNewGalleryInfo(profile_state, galleries_info, empty_dir(), |
| 887 false /*removable*/, false /* media device */); | 893 false /*removable*/, false /* media device */); |
| 888 } | 894 } |
| 889 | 895 |
| 890 } // namespace | 896 } // namespace |
| 891 | 897 |
| 892 } // namespace chrome | 898 } // namespace chrome |
| OLD | NEW |