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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 AttachDevice(StorageInfo::MTP_OR_PTP, "mtp_fake_id", location); | 160 AttachDevice(StorageInfo::MTP_OR_PTP, "mtp_fake_id", location); |
161 | 161 |
162 FSInfoMap results; | 162 FSInfoMap results; |
163 MediaFileSystemRegistry* registry = | 163 MediaFileSystemRegistry* registry = |
164 g_browser_process->media_file_system_registry(); | 164 g_browser_process->media_file_system_registry(); |
165 registry->GetMediaFileSystemsForExtension( | 165 registry->GetMediaFileSystemsForExtension( |
166 web_contents(), extension_.get(), | 166 web_contents(), extension_.get(), |
167 base::Bind(&GetGalleryInfoCallback, base::Unretained(&results))); | 167 base::Bind(&GetGalleryInfoCallback, base::Unretained(&results))); |
168 base::RunLoop().RunUntilIdle(); | 168 base::RunLoop().RunUntilIdle(); |
169 | 169 |
170 ASSERT_EQ(media_directories_.num_galleries() + 1, results.size()); | 170 ASSERT_EQ(media_directories_.num_galleries() + 1u, results.size()); |
171 bool checked = false; | 171 bool checked = false; |
172 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) { | 172 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) { |
173 MediaFileSystemInfo info = i->second; | 173 MediaFileSystemInfo info = i->second; |
174 if (info.path == location) { | 174 if (info.path == location) { |
175 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true); | 175 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true); |
176 checked = true; | 176 checked = true; |
177 break; | 177 break; |
178 } | 178 } |
179 } | 179 } |
180 EXPECT_TRUE(checked); | 180 EXPECT_TRUE(checked); |
181 } | 181 } |
OLD | NEW |