Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / chromeos / file_manager / gallery_browsertest.cc
blob5b89b7dd3d5433d2bdb16811c75b40ecf0f1bb1c
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 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, RotateImageOnDownloads) {
147 set_test_case_name("rotateImageOnDownloads");
148 StartTest();
151 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode, RotateImageOnDownloads) {
152 set_test_case_name("rotateImageOnDownloads");
153 StartTest();
156 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, RotateImageOnDrive) {
157 set_test_case_name("rotateImageOnDrive");
158 StartTest();
161 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
162 #define MAYBE_CropImageOnDownloads DISABLED_CropImageOnDownloads
163 #else
164 #define MAYBE_CropImageOnDownloads CropImageOnDownloads
165 #endif
166 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_CropImageOnDownloads) {
167 set_test_case_name("cropImageOnDownloads");
168 StartTest();
171 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode, CropImageOnDownloads) {
172 set_test_case_name("cropImageOnDownloads");
173 StartTest();
176 // http://crbug.com/508949
177 #if defined(MEMORY_SANITIZER)
178 #define MAYBE_CropImageOnDrive DISABLED_CropImageOnDrive
179 #else
180 #define MAYBE_CropImageOnDrive CropImageOnDrive
181 #endif
182 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_CropImageOnDrive) {
183 set_test_case_name("cropImageOnDrive");
184 StartTest();
187 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
188 #define MAYBE_ExposureImageOnDownloads DISABLED_ExposureImageOnDownloads
189 #else
190 #define MAYBE_ExposureImageOnDownloads ExposureImageOnDownloads
191 #endif
192 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_ExposureImageOnDownloads) {
193 set_test_case_name("exposureImageOnDownloads");
194 StartTest();
197 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode,
198 ExposureImageOnDownloads) {
199 set_test_case_name("exposureImageOnDownloads");
200 StartTest();
203 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
204 #define MAYBE_ExposureImageOnDrive DISABLED_ExposureImageOnDrive
205 #else
206 #define MAYBE_ExposureImageOnDrive ExposureImageOnDrive
207 #endif
208 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_ExposureImageOnDrive) {
209 set_test_case_name("exposureImageOnDrive");
210 StartTest();
213 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
214 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDownloads \
215 DISABLED_EnableDisableOverwriteOriginalCheckboxOnDownloads
216 #else
217 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDownloads \
218 EnableDisableOverwriteOriginalCheckboxOnDownloads
219 #endif
220 IN_PROC_BROWSER_TEST_F(
221 GalleryBrowserTest,
222 MAYBE_EnableDisableOverwriteOriginalCheckboxOnDownloads) {
223 set_test_case_name("enableDisableOverwriteOriginalCheckboxOnDownloads");
224 StartTest();
227 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
228 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDrive \
229 DISABLED_EnableDisableOverwriteOriginalCheckboxOnDrive
230 #else
231 #define MAYBE_EnableDisableOverwriteOriginalCheckboxOnDrive \
232 EnableDisableOverwriteOriginalCheckboxOnDrive
233 #endif
234 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest,
235 MAYBE_EnableDisableOverwriteOriginalCheckboxOnDrive) {
236 set_test_case_name("enableDisableOverwriteOriginalCheckboxOnDrive");
237 StartTest();
240 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest,
241 RenameImageInThumbnailModeOnDownloads) {
242 set_test_case_name("renameImageInThumbnailModeOnDownloads");
243 StartTest();
246 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, RenameImageInThumbnailModeOnDrive) {
247 set_test_case_name("renameImageInThumbnailModeOnDrive");
248 StartTest();
251 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
252 #define MAYBE_DeleteAllImagesInThumbnailModeOnDownloads \
253 DISABLED_DeleteAllImagesInThumbnailModeOnDownloads
254 #else
255 #define MAYBE_DeleteAllImagesInThumbnailModeOnDownloads \
256 DeleteAllImagesInThumbnailModeOnDownloads
257 #endif
258 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest,
259 MAYBE_DeleteAllImagesInThumbnailModeOnDownloads) {
260 set_test_case_name("deleteAllImagesInThumbnailModeOnDownloads");
261 StartTest();
264 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
265 #define MAYBE_DeleteAllImagesInThumbnailModeOnDrive \
266 DISABLED_DeleteAllImagesInThumbnailModeOnDrive
267 #else
268 #define MAYBE_DeleteAllImagesInThumbnailModeOnDrive \
269 DeleteAllImagesInThumbnailModeOnDrive
270 #endif
271 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest,
272 MAYBE_DeleteAllImagesInThumbnailModeOnDrive) {
273 set_test_case_name("deleteAllImagesInThumbnailModeOnDrive");
274 StartTest();
277 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
278 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDownloads \
279 DISABLED_EmptySpaceClickUnselectsInThumbnailModeOnDownloads
280 #else
281 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDownloads \
282 EmptySpaceClickUnselectsInThumbnailModeOnDownloads
283 #endif
284 IN_PROC_BROWSER_TEST_F(
285 GalleryBrowserTest,
286 MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDownloads) {
287 set_test_case_name("emptySpaceClickUnselectsInThumbnailModeOnDownloads");
288 StartTest();
291 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
292 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDrive \
293 DISABLED_EmptySpaceClickUnselectsInThumbnailModeOnDrive
294 #else
295 #define MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDrive \
296 EmptySpaceClickUnselectsInThumbnailModeOnDrive
297 #endif
298 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest,
299 MAYBE_EmptySpaceClickUnselectsInThumbnailModeOnDrive) {
300 set_test_case_name("emptySpaceClickUnselectsInThumbnailModeOnDrive");
301 StartTest();
304 } // namespace file_manager