OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // MediaGalleries gallery watch API browser tests. | 5 // MediaGalleries gallery watch API browser tests. |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/file_path_watcher.h" | 8 #include "base/files/file_path_watcher.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 preferences->SetGalleryPermissionForExtension(*extension_, id, true); | 165 preferences->SetGalleryPermissionForExtension(*extension_, id, true); |
166 } | 166 } |
167 | 167 |
168 void FetchMediaGalleriesList() { | 168 void FetchMediaGalleriesList() { |
169 ExtensionTestMessageListener get_media_systems_finished( | 169 ExtensionTestMessageListener get_media_systems_finished( |
170 kGetMediaFileSystemsCallbackOK, false /* no reply */); | 170 kGetMediaFileSystemsCallbackOK, false /* no reply */); |
171 ExecuteCmdAndCheckReply(kGetMediaFileSystemsCmd, kGetMediaFileSystemsOK); | 171 ExecuteCmdAndCheckReply(kGetMediaFileSystemsCmd, kGetMediaFileSystemsOK); |
172 EXPECT_TRUE(get_media_systems_finished.WaitUntilSatisfied()); | 172 EXPECT_TRUE(get_media_systems_finished.WaitUntilSatisfied()); |
173 } | 173 } |
174 | 174 |
175 scoped_ptr<EnsureMediaDirectoriesExists> ensure_media_directories_exists_; | 175 std::unique_ptr<EnsureMediaDirectoriesExists> |
| 176 ensure_media_directories_exists_; |
176 | 177 |
177 base::ScopedTempDir test_gallery_; | 178 base::ScopedTempDir test_gallery_; |
178 | 179 |
179 const extensions::Extension* extension_; | 180 const extensions::Extension* extension_; |
180 | 181 |
181 content::RenderViewHost* background_host_; | 182 content::RenderViewHost* background_host_; |
182 | 183 |
183 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesGalleryWatchApiTest); | 184 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesGalleryWatchApiTest); |
184 }; | 185 }; |
185 | 186 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 | 281 |
281 IN_PROC_BROWSER_TEST_F(MediaGalleriesGalleryWatchApiTest, | 282 IN_PROC_BROWSER_TEST_F(MediaGalleriesGalleryWatchApiTest, |
282 SetupWatchOnInvalidGallery) { | 283 SetupWatchOnInvalidGallery) { |
283 // Add gallery watch listener. | 284 // Add gallery watch listener. |
284 ExecuteCmdAndCheckReply(kAddGalleryChangedListenerCmd, | 285 ExecuteCmdAndCheckReply(kAddGalleryChangedListenerCmd, |
285 kAddGalleryChangedListenerOK); | 286 kAddGalleryChangedListenerOK); |
286 // Set up a invalid gallery watch. | 287 // Set up a invalid gallery watch. |
287 ExecuteCmdAndCheckReply( | 288 ExecuteCmdAndCheckReply( |
288 kSetupWatchOnInvalidGalleryCmd, kAddGalleryWatchRequestFailed); | 289 kSetupWatchOnInvalidGalleryCmd, kAddGalleryWatchRequestFailed); |
289 } | 290 } |
OLD | NEW |