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 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, RotateImageOnDownloads
) {
147 set_test_case_name("rotateImageOnDownloads");
151 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
, RotateImageOnDownloads
) {
152 set_test_case_name("rotateImageOnDownloads");
156 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, RotateImageOnDrive
) {
157 set_test_case_name("rotateImageOnDrive");
161 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
162 #define MAYBE_CropImageOnDownloads DISABLED_CropImageOnDownloads
164 #define MAYBE_CropImageOnDownloads CropImageOnDownloads
166 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_CropImageOnDownloads
) {
167 set_test_case_name("cropImageOnDownloads");
171 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
, CropImageOnDownloads
) {
172 set_test_case_name("cropImageOnDownloads");
176 // http://crbug.com/508949
177 #if defined(MEMORY_SANITIZER)
178 #define MAYBE_CropImageOnDrive DISABLED_CropImageOnDrive
180 #define MAYBE_CropImageOnDrive CropImageOnDrive
182 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_CropImageOnDrive
) {
183 set_test_case_name("cropImageOnDrive");
187 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
188 #define MAYBE_ExposureImageOnDownloads DISABLED_ExposureImageOnDownloads
190 #define MAYBE_ExposureImageOnDownloads ExposureImageOnDownloads
192 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_ExposureImageOnDownloads
) {
193 set_test_case_name("exposureImageOnDownloads");
197 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
,
198 ExposureImageOnDownloads
) {
199 set_test_case_name("exposureImageOnDownloads");
203 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
204 #define MAYBE_ExposureImageOnDrive DISABLED_ExposureImageOnDrive
206 #define MAYBE_ExposureImageOnDrive ExposureImageOnDrive
208 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_ExposureImageOnDrive
) {
209 set_test_case_name("exposureImageOnDrive");
213 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
214 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDownloads \
215 DISABLED_EnableDisableOverwriteOriginalCheckboxOnDownloads
217 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDownloads \
218 EnableDisableOverwriteOriginalCheckboxOnDownloads
220 IN_PROC_BROWSER_TEST_F(
222 MAYBE_EnableDisableOverwriteOriginalCheckboxOnDownloads
) {
223 set_test_case_name("enableDisableOverwriteOriginalCheckboxOnDownloads");
227 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
228 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDrive \
229 DISABLED_EnableDisableOverwriteOriginalCheckboxOnDrive
231 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDrive \
232 EnableDisableOverwriteOriginalCheckboxOnDrive
234 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
,
235 MAYBE_EnableDisableOverwriteOriginalCheckboxOnDrive
) {
236 set_test_case_name("enableDisableOverwriteOriginalCheckboxOnDrive");
240 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
,
241 RenameImageInThumbnailModeOnDownloads
) {
242 set_test_case_name("renameImageInThumbnailModeOnDownloads");
246 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, RenameImageInThumbnailModeOnDrive
) {
247 set_test_case_name("renameImageInThumbnailModeOnDrive");
251 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
252 #define MAYBE_DeleteAllImagesInThumbnailModeOnDownloads \
253 DISABLED_DeleteAllImagesInThumbnailModeOnDownloads
255 #define MAYBE_DeleteAllImagesInThumbnailModeOnDownloads \
256 DeleteAllImagesInThumbnailModeOnDownloads
258 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
,
259 MAYBE_DeleteAllImagesInThumbnailModeOnDownloads
) {
260 set_test_case_name("deleteAllImagesInThumbnailModeOnDownloads");
264 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
265 #define MAYBE_DeleteAllImagesInThumbnailModeOnDrive \
266 DISABLED_DeleteAllImagesInThumbnailModeOnDrive
268 #define MAYBE_DeleteAllImagesInThumbnailModeOnDrive \
269 DeleteAllImagesInThumbnailModeOnDrive
271 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
,
272 MAYBE_DeleteAllImagesInThumbnailModeOnDrive
) {
273 set_test_case_name("deleteAllImagesInThumbnailModeOnDrive");
277 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
278 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDownloads \
279 DISABLED_EmptySpaceClickUnselectsInThumbnailModeOnDownloads
281 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDownloads \
282 EmptySpaceClickUnselectsInThumbnailModeOnDownloads
284 IN_PROC_BROWSER_TEST_F(
286 MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDownloads
) {
287 set_test_case_name("emptySpaceClickUnselectsInThumbnailModeOnDownloads");
291 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
292 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDrive \
293 DISABLED_EmptySpaceClickUnselectsInThumbnailModeOnDrive
295 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDrive \
296 EmptySpaceClickUnselectsInThumbnailModeOnDrive
298 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
,
299 MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDrive
) {
300 set_test_case_name("emptySpaceClickUnselectsInThumbnailModeOnDrive");
304 } // namespace file_manager