Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / chromeos / file_manager / gallery_browsertest.cc
blobd2ddf01231f969e1a4eb503da2c333c77bcbc0d4
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 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, OpenSingleImageOnDownloads) {
33 set_test_case_name("openSingleImageOnDownloads");
34 StartTest();
37 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode,
38 OpenSingleImageOnDownloads) {
39 set_test_case_name("openSingleImageOnDownloads");
40 StartTest();
43 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
44 #define MAYBE_OpenSingleImageOnDrive DISABLED_OpenSingleImageOnDrive
45 #else
46 #define MAYBE_OpenSingleImageOnDrive OpenSingleImageOnDrive
47 #endif
48 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_OpenSingleImageOnDrive) {
49 set_test_case_name("openSingleImageOnDrive");
50 StartTest();
53 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, OpenMultipleImagesOnDownloads) {
54 set_test_case_name("openMultipleImagesOnDownloads");
55 StartTest();
58 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode,
59 OpenMultipleImagesOnDownloads) {
60 set_test_case_name("openMultipleImagesOnDownloads");
61 StartTest();
64 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, OpenMultipleImagesOnDrive) {
65 set_test_case_name("openMultipleImagesOnDrive");
66 StartTest();
69 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, TraverseSlideImagesOnDownloads) {
70 set_test_case_name("traverseSlideImagesOnDownloads");
71 StartTest();
74 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode,
75 TraverseSlideImagesOnDownloads) {
76 set_test_case_name("traverseSlideImagesOnDownloads");
77 StartTest();
80 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, TraverseSlideImagesOnDrive) {
81 set_test_case_name("traverseSlideImagesOnDrive");
82 StartTest();
85 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, RenameImageOnDownloads) {
86 set_test_case_name("renameImageOnDownloads");
87 StartTest();
90 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode, RenameImageOnDownloads) {
91 set_test_case_name("renameImageOnDownloads");
92 StartTest();
95 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
96 #define MAYBE_RenameImageOnDrive DISABLED_RenameImageOnDrive
97 #else
98 #define MAYBE_RenameImageOnDrive RenameImageOnDrive
99 #endif
100 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_RenameImageOnDrive) {
101 set_test_case_name("renameImageOnDrive");
102 StartTest();
105 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, DeleteImageOnDownloads) {
106 set_test_case_name("deleteImageOnDownloads");
107 StartTest();
110 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode, DeleteImageOnDownloads) {
111 set_test_case_name("deleteImageOnDownloads");
112 StartTest();
115 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, DeleteImageOnDrive) {
116 set_test_case_name("deleteImageOnDrive");
117 StartTest();
120 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, RotateImageOnDownloads) {
121 set_test_case_name("rotateImageOnDownloads");
122 StartTest();
125 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode, RotateImageOnDownloads) {
126 set_test_case_name("rotateImageOnDownloads");
127 StartTest();
130 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, RotateImageOnDrive) {
131 set_test_case_name("rotateImageOnDrive");
132 StartTest();
135 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
136 #define MAYBE_CropImageOnDownloads DISABLED_CropImageOnDownloads
137 #else
138 #define MAYBE_CropImageOnDownloads CropImageOnDownloads
139 #endif
140 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_CropImageOnDownloads) {
141 set_test_case_name("cropImageOnDownloads");
142 StartTest();
145 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode, CropImageOnDownloads) {
146 set_test_case_name("cropImageOnDownloads");
147 StartTest();
150 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, CropImageOnDrive) {
151 set_test_case_name("cropImageOnDrive");
152 StartTest();
155 #if defined(DISABLE_SLOW_FILESAPP_TESTS)
156 #define MAYBE_ExposureImageOnDownloads DISABLED_ExposureImageOnDownloads
157 #else
158 #define MAYBE_ExposureImageOnDownloads ExposureImageOnDownloads
159 #endif
160 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_ExposureImageOnDownloads) {
161 set_test_case_name("exposureImageOnDownloads");
162 StartTest();
165 IN_PROC_BROWSER_TEST_F(GalleryBrowserTestInGuestMode,
166 ExposureImageOnDownloads) {
167 set_test_case_name("exposureImageOnDownloads");
168 StartTest();
171 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, ExposureImageOnDrive) {
172 set_test_case_name("exposureImageOnDrive");
173 StartTest();
176 } // namespace file_manager