1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/file_manager/file_manager_browsertest_base.h"
7 namespace file_manager
{
10 class GalleryBrowserTestBase
: public FileManagerBrowserTestBase
{
12 GuestMode
GetGuestModeParam() const override
{ return M
; }
13 const char* GetTestCaseNameParam() const override
{
14 return test_case_name_
.c_str();
18 const char* GetTestManifestName() const override
{
19 return "gallery_test_manifest.json";
22 void set_test_case_name(const std::string
& name
) { test_case_name_
= name
; }
25 base::ListValue scripts_
;
26 std::string test_case_name_
;
29 typedef GalleryBrowserTestBase
<NOT_IN_GUEST_MODE
> GalleryBrowserTest
;
30 typedef GalleryBrowserTestBase
<IN_GUEST_MODE
> GalleryBrowserTestInGuestMode
;
32 // http://crbug.com/508949
33 #if defined(MEMORY_SANITIZER)
34 #define MAYBE_OpenSingleImageOnDownloads DISABLED_OpenSingleImageOnDownloads
36 #define MAYBE_OpenSingleImageOnDownloads OpenSingleImageOnDownloads
38 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_OpenSingleImageOnDownloads
) {
39 set_test_case_name("openSingleImageOnDownloads");
43 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
,
44 OpenSingleImageOnDownloads
) {
45 set_test_case_name("openSingleImageOnDownloads");
49 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
50 #define MAYBE_OpenSingleImageOnDrive DISABLED_OpenSingleImageOnDrive
52 #define MAYBE_OpenSingleImageOnDrive OpenSingleImageOnDrive
54 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_OpenSingleImageOnDrive
) {
55 set_test_case_name("openSingleImageOnDrive");
59 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, OpenMultipleImagesOnDownloads
) {
60 set_test_case_name("openMultipleImagesOnDownloads");
64 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
,
65 OpenMultipleImagesOnDownloads
) {
66 set_test_case_name("openMultipleImagesOnDownloads");
70 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, OpenMultipleImagesOnDrive
) {
71 set_test_case_name("openMultipleImagesOnDrive");
75 // http://crbug.com/508949
76 #if defined(MEMORY_SANITIZER)
77 #define MAYBE_TraverseSlideImagesOnDownloads \
78 DISABLED_TraverseSlideImagesOnDownloads
80 #define MAYBE_TraverseSlideImagesOnDownloads TraverseSlideImagesOnDownloads
82 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
,
83 MAYBE_TraverseSlideImagesOnDownloads
) {
84 set_test_case_name("traverseSlideImagesOnDownloads");
88 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
,
89 TraverseSlideImagesOnDownloads
) {
90 set_test_case_name("traverseSlideImagesOnDownloads");
94 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, TraverseSlideImagesOnDrive
) {
95 set_test_case_name("traverseSlideImagesOnDrive");
99 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, RenameImageOnDownloads
) {
100 set_test_case_name("renameImageOnDownloads");
104 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
, RenameImageOnDownloads
) {
105 set_test_case_name("renameImageOnDownloads");
109 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
110 #define MAYBE_RenameImageOnDrive DISABLED_RenameImageOnDrive
112 #define MAYBE_RenameImageOnDrive RenameImageOnDrive
114 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_RenameImageOnDrive
) {
115 set_test_case_name("renameImageOnDrive");
119 // http://crbug.com/508949
120 #if defined(MEMORY_SANITIZER)
121 #define MAYBE_DeleteImageOnDownloads DISABLED_DeleteImageOnDownloads
123 #define MAYBE_DeleteImageOnDownloads DeleteImageOnDownloads
125 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_DeleteImageOnDownloads
) {
126 set_test_case_name("deleteImageOnDownloads");
130 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
, DeleteImageOnDownloads
) {
131 set_test_case_name("deleteImageOnDownloads");
135 // http://crbug.com/508949
136 #if defined(MEMORY_SANITIZER)
137 #define MAYBE_DeleteImageOnDrive DISABLED_DeleteImageOnDrive
139 #define MAYBE_DeleteImageOnDrive DeleteImageOnDrive
141 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_DeleteImageOnDrive
) {
142 set_test_case_name("deleteImageOnDrive");
146 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
147 #define MAYBE_CheckAvailabilityOfShareButtonOnDownloads \
148 DISABLED_CheckAvailabilityOfShareButtonOnDownloads
150 #define MAYBE_CheckAvailabilityOfShareButtonOnDownloads \
151 CheckAvailabilityOfShareButtonOnDownloads
153 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
,
154 MAYBE_CheckAvailabilityOfShareButtonOnDownloads
) {
155 set_test_case_name("checkAvailabilityOfShareButtonOnDownloads");
159 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
,
160 MAYBE_CheckAvailabilityOfShareButtonOnDownloads
) {
161 set_test_case_name("checkAvailabilityOfShareButtonOnDownloads");
165 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
166 #define MAYBE_CheckAvailabilityOfShareButtonOnDrive \
167 DISABLED_CheckAvailabilityOfShareButtonOnDrive
169 #define MAYBE_CheckAvailabilityOfShareButtonOnDrive \
170 CheckAvailabilityOfShareButtonOnDrive
172 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
,
173 MAYBE_CheckAvailabilityOfShareButtonOnDrive
) {
174 set_test_case_name("checkAvailabilityOfShareButtonOnDrive");
178 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, RotateImageOnDownloads
) {
179 set_test_case_name("rotateImageOnDownloads");
183 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
, RotateImageOnDownloads
) {
184 set_test_case_name("rotateImageOnDownloads");
188 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, RotateImageOnDrive
) {
189 set_test_case_name("rotateImageOnDrive");
193 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
194 #define MAYBE_CropImageOnDownloads DISABLED_CropImageOnDownloads
196 #define MAYBE_CropImageOnDownloads CropImageOnDownloads
198 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_CropImageOnDownloads
) {
199 set_test_case_name("cropImageOnDownloads");
203 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
, CropImageOnDownloads
) {
204 set_test_case_name("cropImageOnDownloads");
208 // http://crbug.com/508949
209 #if defined(MEMORY_SANITIZER)
210 #define MAYBE_CropImageOnDrive DISABLED_CropImageOnDrive
212 #define MAYBE_CropImageOnDrive CropImageOnDrive
214 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_CropImageOnDrive
) {
215 set_test_case_name("cropImageOnDrive");
219 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
220 #define MAYBE_ExposureImageOnDownloads DISABLED_ExposureImageOnDownloads
222 #define MAYBE_ExposureImageOnDownloads ExposureImageOnDownloads
224 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_ExposureImageOnDownloads
) {
225 set_test_case_name("exposureImageOnDownloads");
229 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
,
230 ExposureImageOnDownloads
) {
231 set_test_case_name("exposureImageOnDownloads");
235 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
236 #define MAYBE_ExposureImageOnDrive DISABLED_ExposureImageOnDrive
238 #define MAYBE_ExposureImageOnDrive ExposureImageOnDrive
240 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_ExposureImageOnDrive
) {
241 set_test_case_name("exposureImageOnDrive");
245 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
246 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDownloads \
247 DISABLED_EnableDisableOverwriteOriginalCheckboxOnDownloads
249 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDownloads \
250 EnableDisableOverwriteOriginalCheckboxOnDownloads
252 IN_PROC_BROWSER_TEST_F(
254 MAYBE_EnableDisableOverwriteOriginalCheckboxOnDownloads
) {
255 set_test_case_name("enableDisableOverwriteOriginalCheckboxOnDownloads");
259 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
260 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDrive \
261 DISABLED_EnableDisableOverwriteOriginalCheckboxOnDrive
263 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDrive \
264 EnableDisableOverwriteOriginalCheckboxOnDrive
266 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
,
267 MAYBE_EnableDisableOverwriteOriginalCheckboxOnDrive
) {
268 set_test_case_name("enableDisableOverwriteOriginalCheckboxOnDrive");
272 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
,
273 RenameImageInThumbnailModeOnDownloads
) {
274 set_test_case_name("renameImageInThumbnailModeOnDownloads");
278 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, RenameImageInThumbnailModeOnDrive
) {
279 set_test_case_name("renameImageInThumbnailModeOnDrive");
283 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
284 #define MAYBE_DeleteAllImagesInThumbnailModeOnDownloads \
285 DISABLED_DeleteAllImagesInThumbnailModeOnDownloads
287 #define MAYBE_DeleteAllImagesInThumbnailModeOnDownloads \
288 DeleteAllImagesInThumbnailModeOnDownloads
290 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
,
291 MAYBE_DeleteAllImagesInThumbnailModeOnDownloads
) {
292 set_test_case_name("deleteAllImagesInThumbnailModeOnDownloads");
296 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
297 #define MAYBE_DeleteAllImagesInThumbnailModeOnDrive \
298 DISABLED_DeleteAllImagesInThumbnailModeOnDrive
300 #define MAYBE_DeleteAllImagesInThumbnailModeOnDrive \
301 DeleteAllImagesInThumbnailModeOnDrive
303 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
,
304 MAYBE_DeleteAllImagesInThumbnailModeOnDrive
) {
305 set_test_case_name("deleteAllImagesInThumbnailModeOnDrive");
309 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
310 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDownloads \
311 DISABLED_EmptySpaceClickUnselectsInThumbnailModeOnDownloads
313 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDownloads \
314 EmptySpaceClickUnselectsInThumbnailModeOnDownloads
316 IN_PROC_BROWSER_TEST_F(
318 MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDownloads
) {
319 set_test_case_name("emptySpaceClickUnselectsInThumbnailModeOnDownloads");
323 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
324 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDrive \
325 DISABLED_EmptySpaceClickUnselectsInThumbnailModeOnDrive
327 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDrive \
328 EmptySpaceClickUnselectsInThumbnailModeOnDrive
330 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
,
331 MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDrive
) {
332 set_test_case_name("emptySpaceClickUnselectsInThumbnailModeOnDrive");
336 } // namespace file_manager