Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / chromeos / file_manager / gallery_browsertest.cc
blob004f418df884ed39e7ebad18f76820b444947086
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 {
9 template <GuestMode M>
10 class GalleryBrowserTestBase : public FileManagerBrowserTestBase {
11 public:
12 GuestMode GetGuestModeParam() const override { return M; }
13 const char* GetTestCaseNameParam() const override {
14 return test_case_name_.c_str();
17 protected:
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; }
24 private:
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
35 #else
36 #define MAYBE_OpenSingleImageOnDownloads OpenSingleImageOnDownloads
37 #endif
38 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_OpenSingleImageOnDownloads) {
39 set_test_case_name("openSingleImageOnDownloads");
40 StartTest();
43 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode,
44 OpenSingleImageOnDownloads) {
45 set_test_case_name("openSingleImageOnDownloads");
46 StartTest();
49 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
50 #define MAYBE_OpenSingleImageOnDrive DISABLED_OpenSingleImageOnDrive
51 #else
52 #define MAYBE_OpenSingleImageOnDrive OpenSingleImageOnDrive
53 #endif
54 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_OpenSingleImageOnDrive) {
55 set_test_case_name("openSingleImageOnDrive");
56 StartTest();
59 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, OpenMultipleImagesOnDownloads) {
60 set_test_case_name("openMultipleImagesOnDownloads");
61 StartTest();
64 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode,
65 OpenMultipleImagesOnDownloads) {
66 set_test_case_name("openMultipleImagesOnDownloads");
67 StartTest();
70 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, OpenMultipleImagesOnDrive) {
71 set_test_case_name("openMultipleImagesOnDrive");
72 StartTest();
75 // http://crbug.com/508949
76 #if defined(MEMORY_SANITIZER)
77 #define MAYBE_TraverseSlideImagesOnDownloads \
78 DISABLED_TraverseSlideImagesOnDownloads
79 #else
80 #define MAYBE_TraverseSlideImagesOnDownloads TraverseSlideImagesOnDownloads
81 #endif
82 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest,
83 MAYBE_TraverseSlideImagesOnDownloads) {
84 set_test_case_name("traverseSlideImagesOnDownloads");
85 StartTest();
88 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode,
89 TraverseSlideImagesOnDownloads) {
90 set_test_case_name("traverseSlideImagesOnDownloads");
91 StartTest();
94 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, TraverseSlideImagesOnDrive) {
95 set_test_case_name("traverseSlideImagesOnDrive");
96 StartTest();
99 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, RenameImageOnDownloads) {
100 set_test_case_name("renameImageOnDownloads");
101 StartTest();
104 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode, RenameImageOnDownloads) {
105 set_test_case_name("renameImageOnDownloads");
106 StartTest();
109 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
110 #define MAYBE_RenameImageOnDrive DISABLED_RenameImageOnDrive
111 #else
112 #define MAYBE_RenameImageOnDrive RenameImageOnDrive
113 #endif
114 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_RenameImageOnDrive) {
115 set_test_case_name("renameImageOnDrive");
116 StartTest();
119 // http://crbug.com/508949
120 #if defined(MEMORY_SANITIZER)
121 #define MAYBE_DeleteImageOnDownloads DISABLED_DeleteImageOnDownloads
122 #else
123 #define MAYBE_DeleteImageOnDownloads DeleteImageOnDownloads
124 #endif
125 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_DeleteImageOnDownloads) {
126 set_test_case_name("deleteImageOnDownloads");
127 StartTest();
130 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode, DeleteImageOnDownloads) {
131 set_test_case_name("deleteImageOnDownloads");
132 StartTest();
135 // http://crbug.com/508949
136 #if defined(MEMORY_SANITIZER)
137 #define MAYBE_DeleteImageOnDrive DISABLED_DeleteImageOnDrive
138 #else
139 #define MAYBE_DeleteImageOnDrive DeleteImageOnDrive
140 #endif
141 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_DeleteImageOnDrive) {
142 set_test_case_name("deleteImageOnDrive");
143 StartTest();
146 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
147 #define MAYBE_CheckAvailabilityOfShareButtonOnDownloads \
148 DISABLED_CheckAvailabilityOfShareButtonOnDownloads
149 #else
150 #define MAYBE_CheckAvailabilityOfShareButtonOnDownloads \
151 CheckAvailabilityOfShareButtonOnDownloads
152 #endif
153 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest,
154 MAYBE_CheckAvailabilityOfShareButtonOnDownloads) {
155 set_test_case_name("checkAvailabilityOfShareButtonOnDownloads");
156 StartTest();
159 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode,
160 MAYBE_CheckAvailabilityOfShareButtonOnDownloads) {
161 set_test_case_name("checkAvailabilityOfShareButtonOnDownloads");
162 StartTest();
165 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
166 #define MAYBE_CheckAvailabilityOfShareButtonOnDrive \
167 DISABLED_CheckAvailabilityOfShareButtonOnDrive
168 #else
169 #define MAYBE_CheckAvailabilityOfShareButtonOnDrive \
170 CheckAvailabilityOfShareButtonOnDrive
171 #endif
172 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest,
173 MAYBE_CheckAvailabilityOfShareButtonOnDrive) {
174 set_test_case_name("checkAvailabilityOfShareButtonOnDrive");
175 StartTest();
178 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, RotateImageOnDownloads) {
179 set_test_case_name("rotateImageOnDownloads");
180 StartTest();
183 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode, RotateImageOnDownloads) {
184 set_test_case_name("rotateImageOnDownloads");
185 StartTest();
188 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, RotateImageOnDrive) {
189 set_test_case_name("rotateImageOnDrive");
190 StartTest();
193 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
194 #define MAYBE_CropImageOnDownloads DISABLED_CropImageOnDownloads
195 #else
196 #define MAYBE_CropImageOnDownloads CropImageOnDownloads
197 #endif
198 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_CropImageOnDownloads) {
199 set_test_case_name("cropImageOnDownloads");
200 StartTest();
203 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode, CropImageOnDownloads) {
204 set_test_case_name("cropImageOnDownloads");
205 StartTest();
208 // http://crbug.com/508949
209 #if defined(MEMORY_SANITIZER)
210 #define MAYBE_CropImageOnDrive DISABLED_CropImageOnDrive
211 #else
212 #define MAYBE_CropImageOnDrive CropImageOnDrive
213 #endif
214 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_CropImageOnDrive) {
215 set_test_case_name("cropImageOnDrive");
216 StartTest();
219 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
220 #define MAYBE_ExposureImageOnDownloads DISABLED_ExposureImageOnDownloads
221 #else
222 #define MAYBE_ExposureImageOnDownloads ExposureImageOnDownloads
223 #endif
224 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_ExposureImageOnDownloads) {
225 set_test_case_name("exposureImageOnDownloads");
226 StartTest();
229 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode,
230 ExposureImageOnDownloads) {
231 set_test_case_name("exposureImageOnDownloads");
232 StartTest();
235 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
236 #define MAYBE_ExposureImageOnDrive DISABLED_ExposureImageOnDrive
237 #else
238 #define MAYBE_ExposureImageOnDrive ExposureImageOnDrive
239 #endif
240 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_ExposureImageOnDrive) {
241 set_test_case_name("exposureImageOnDrive");
242 StartTest();
245 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
246 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDownloads \
247 DISABLED_EnableDisableOverwriteOriginalCheckboxOnDownloads
248 #else
249 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDownloads \
250 EnableDisableOverwriteOriginalCheckboxOnDownloads
251 #endif
252 IN_PROC_BROWSER_TEST_F(
253 GalleryBrowserTest,
254 MAYBE_EnableDisableOverwriteOriginalCheckboxOnDownloads) {
255 set_test_case_name("enableDisableOverwriteOriginalCheckboxOnDownloads");
256 StartTest();
259 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
260 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDrive \
261 DISABLED_EnableDisableOverwriteOriginalCheckboxOnDrive
262 #else
263 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDrive \
264 EnableDisableOverwriteOriginalCheckboxOnDrive
265 #endif
266 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest,
267 MAYBE_EnableDisableOverwriteOriginalCheckboxOnDrive) {
268 set_test_case_name("enableDisableOverwriteOriginalCheckboxOnDrive");
269 StartTest();
272 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest,
273 RenameImageInThumbnailModeOnDownloads) {
274 set_test_case_name("renameImageInThumbnailModeOnDownloads");
275 StartTest();
278 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, RenameImageInThumbnailModeOnDrive) {
279 set_test_case_name("renameImageInThumbnailModeOnDrive");
280 StartTest();
283 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
284 #define MAYBE_DeleteAllImagesInThumbnailModeOnDownloads \
285 DISABLED_DeleteAllImagesInThumbnailModeOnDownloads
286 #else
287 #define MAYBE_DeleteAllImagesInThumbnailModeOnDownloads \
288 DeleteAllImagesInThumbnailModeOnDownloads
289 #endif
290 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest,
291 MAYBE_DeleteAllImagesInThumbnailModeOnDownloads) {
292 set_test_case_name("deleteAllImagesInThumbnailModeOnDownloads");
293 StartTest();
296 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
297 #define MAYBE_DeleteAllImagesInThumbnailModeOnDrive \
298 DISABLED_DeleteAllImagesInThumbnailModeOnDrive
299 #else
300 #define MAYBE_DeleteAllImagesInThumbnailModeOnDrive \
301 DeleteAllImagesInThumbnailModeOnDrive
302 #endif
303 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest,
304 MAYBE_DeleteAllImagesInThumbnailModeOnDrive) {
305 set_test_case_name("deleteAllImagesInThumbnailModeOnDrive");
306 StartTest();
309 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
310 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDownloads \
311 DISABLED_EmptySpaceClickUnselectsInThumbnailModeOnDownloads
312 #else
313 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDownloads \
314 EmptySpaceClickUnselectsInThumbnailModeOnDownloads
315 #endif
316 IN_PROC_BROWSER_TEST_F(
317 GalleryBrowserTest,
318 MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDownloads) {
319 set_test_case_name("emptySpaceClickUnselectsInThumbnailModeOnDownloads");
320 StartTest();
323 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
324 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDrive \
325 DISABLED_EmptySpaceClickUnselectsInThumbnailModeOnDrive
326 #else
327 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDrive \
328 EmptySpaceClickUnselectsInThumbnailModeOnDrive
329 #endif
330 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest,
331 MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDrive) {
332 set_test_case_name("emptySpaceClickUnselectsInThumbnailModeOnDrive");
333 StartTest();
336 } // namespace file_manager