| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 EXPECT_EQ(removable, info.removable); | 149 EXPECT_EQ(removable, info.removable); |
| 150 EXPECT_EQ(media_device, info.media_device); | 150 EXPECT_EQ(media_device, info.media_device); |
| 151 EXPECT_NE(0UL, info.pref_id); | 151 EXPECT_NE(0UL, info.pref_id); |
| 152 | 152 |
| 153 if (removable) | 153 if (removable) |
| 154 EXPECT_NE(0UL, info.transient_device_id.size()); | 154 EXPECT_NE(0UL, info.transient_device_id.size()); |
| 155 else | 155 else |
| 156 EXPECT_EQ(0UL, info.transient_device_id.size()); | 156 EXPECT_EQ(0UL, info.transient_device_id.size()); |
| 157 } | 157 } |
| 158 | 158 |
| 159 TEST_F(MTPDeviceDelegateImplWinTest, GalleryNameMTP) { | 159 // Crashes on chromium.win/Win7 bot. http://crbug.com/686803 |
| 160 TEST_F(MTPDeviceDelegateImplWinTest, DISABLED_GalleryNameMTP) { |
| 160 base::FilePath location( | 161 base::FilePath location( |
| 161 PortableDeviceWatcherWin::GetStoragePathFromStorageId( | 162 PortableDeviceWatcherWin::GetStoragePathFromStorageId( |
| 162 TestPortableDeviceWatcherWin::kStorageUniqueIdA)); | 163 TestPortableDeviceWatcherWin::kStorageUniqueIdA)); |
| 163 AttachDevice(StorageInfo::MTP_OR_PTP, "mtp_fake_id", location); | 164 AttachDevice(StorageInfo::MTP_OR_PTP, "mtp_fake_id", location); |
| 164 | 165 |
| 165 FSInfoMap results; | 166 FSInfoMap results; |
| 166 MediaFileSystemRegistry* registry = | 167 MediaFileSystemRegistry* registry = |
| 167 g_browser_process->media_file_system_registry(); | 168 g_browser_process->media_file_system_registry(); |
| 168 registry->GetMediaFileSystemsForExtension( | 169 registry->GetMediaFileSystemsForExtension( |
| 169 web_contents(), extension_.get(), | 170 web_contents(), extension_.get(), |
| 170 base::Bind(&GetGalleryInfoCallback, base::Unretained(&results))); | 171 base::Bind(&GetGalleryInfoCallback, base::Unretained(&results))); |
| 171 base::RunLoop().RunUntilIdle(); | 172 base::RunLoop().RunUntilIdle(); |
| 172 | 173 |
| 173 ASSERT_EQ(media_directories_.num_galleries() + 1u, results.size()); | 174 ASSERT_EQ(media_directories_.num_galleries() + 1u, results.size()); |
| 174 bool checked = false; | 175 bool checked = false; |
| 175 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) { | 176 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) { |
| 176 MediaFileSystemInfo info = i->second; | 177 MediaFileSystemInfo info = i->second; |
| 177 if (info.path == location) { | 178 if (info.path == location) { |
| 178 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true); | 179 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true); |
| 179 checked = true; | 180 checked = true; |
| 180 break; | 181 break; |
| 181 } | 182 } |
| 182 } | 183 } |
| 183 EXPECT_TRUE(checked); | 184 EXPECT_TRUE(checked); |
| 184 } | 185 } |
| OLD | NEW |