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 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, OpenSingleImageOnDownloads
) {
33 set_test_case_name("openSingleImageOnDownloads");
37 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
,
38 OpenSingleImageOnDownloads
) {
39 set_test_case_name("openSingleImageOnDownloads");
43 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
44 #define MAYBE_OpenSingleImageOnDrive DISABLED_OpenSingleImageOnDrive
46 #define MAYBE_OpenSingleImageOnDrive OpenSingleImageOnDrive
48 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_OpenSingleImageOnDrive
) {
49 set_test_case_name("openSingleImageOnDrive");
53 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, OpenMultipleImagesOnDownloads
) {
54 set_test_case_name("openMultipleImagesOnDownloads");
58 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
,
59 OpenMultipleImagesOnDownloads
) {
60 set_test_case_name("openMultipleImagesOnDownloads");
64 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, OpenMultipleImagesOnDrive
) {
65 set_test_case_name("openMultipleImagesOnDrive");
69 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, TraverseSlideImagesOnDownloads
) {
70 set_test_case_name("traverseSlideImagesOnDownloads");
74 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
,
75 TraverseSlideImagesOnDownloads
) {
76 set_test_case_name("traverseSlideImagesOnDownloads");
80 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, TraverseSlideImagesOnDrive
) {
81 set_test_case_name("traverseSlideImagesOnDrive");
85 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, RenameImageOnDownloads
) {
86 set_test_case_name("renameImageOnDownloads");
90 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
, RenameImageOnDownloads
) {
91 set_test_case_name("renameImageOnDownloads");
95 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
96 #define MAYBE_RenameImageOnDrive DISABLED_RenameImageOnDrive
98 #define MAYBE_RenameImageOnDrive RenameImageOnDrive
100 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_RenameImageOnDrive
) {
101 set_test_case_name("renameImageOnDrive");
105 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, DeleteImageOnDownloads
) {
106 set_test_case_name("deleteImageOnDownloads");
110 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
, DeleteImageOnDownloads
) {
111 set_test_case_name("deleteImageOnDownloads");
115 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, DeleteImageOnDrive
) {
116 set_test_case_name("deleteImageOnDrive");
120 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, RotateImageOnDownloads
) {
121 set_test_case_name("rotateImageOnDownloads");
125 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
, RotateImageOnDownloads
) {
126 set_test_case_name("rotateImageOnDownloads");
130 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, RotateImageOnDrive
) {
131 set_test_case_name("rotateImageOnDrive");
135 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
136 #define MAYBE_CropImageOnDownloads DISABLED_CropImageOnDownloads
138 #define MAYBE_CropImageOnDownloads CropImageOnDownloads
140 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_CropImageOnDownloads
) {
141 set_test_case_name("cropImageOnDownloads");
145 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
, CropImageOnDownloads
) {
146 set_test_case_name("cropImageOnDownloads");
150 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, CropImageOnDrive
) {
151 set_test_case_name("cropImageOnDrive");
155 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
156 #define MAYBE_ExposureImageOnDownloads DISABLED_ExposureImageOnDownloads
158 #define MAYBE_ExposureImageOnDownloads ExposureImageOnDownloads
160 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, MAYBE_ExposureImageOnDownloads
) {
161 set_test_case_name("exposureImageOnDownloads");
165 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode
,
166 ExposureImageOnDownloads
) {
167 set_test_case_name("exposureImageOnDownloads");
171 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest
, ExposureImageOnDrive
) {
172 set_test_case_name("exposureImageOnDrive");
176 } // namespace file_manager