| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/chromeos/drive/file_system_util.h" | 9 #include "chrome/browser/chromeos/drive/file_system_util.h" |
| 10 #include "chrome/browser/chromeos/file_manager/file_manager_browsertest_base.h" | 10 #include "chrome/browser/chromeos/file_manager/file_manager_browsertest_base.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 FileManagerBrowserTest::SetUpCommandLine(command_line); | 47 FileManagerBrowserTest::SetUpCommandLine(command_line); |
| 48 command_line->AppendSwitchASCII("disable-blink-features", | 48 command_line->AppendSwitchASCII("disable-blink-features", |
| 49 "TrustedEventsDefaultAction"); | 49 "TrustedEventsDefaultAction"); |
| 50 } | 50 } |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 IN_PROC_BROWSER_TEST_P(FileManagerBrowserTestWithLegacyEventDispatch, Test) { | 53 IN_PROC_BROWSER_TEST_P(FileManagerBrowserTestWithLegacyEventDispatch, Test) { |
| 54 StartTest(); | 54 StartTest(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 // Test fixture class for details panel. | |
| 58 // TODO(ryoh): remove after we release details panel feature. | |
| 59 class FileManagerDetailsPanelBrowserTest : public FileManagerBrowserTest { | |
| 60 void SetUpCommandLine(base::CommandLine* command_line) override { | |
| 61 FileManagerBrowserTest::SetUpCommandLine(command_line); | |
| 62 command_line->AppendSwitch("--enable-files-details-panel"); | |
| 63 } | |
| 64 }; | |
| 65 | |
| 66 IN_PROC_BROWSER_TEST_P(FileManagerDetailsPanelBrowserTest, Test) { | |
| 67 StartTest(); | |
| 68 } | |
| 69 | |
| 70 // Unlike TEST/TEST_F, which are macros that expand to further macros, | 57 // Unlike TEST/TEST_F, which are macros that expand to further macros, |
| 71 // INSTANTIATE_TEST_CASE_P is a macro that expands directly to code that | 58 // INSTANTIATE_TEST_CASE_P is a macro that expands directly to code that |
| 72 // stringizes the arguments. As a result, macros passed as parameters (such as | 59 // stringizes the arguments. As a result, macros passed as parameters (such as |
| 73 // prefix or test_case_name) will not be expanded by the preprocessor. To work | 60 // prefix or test_case_name) will not be expanded by the preprocessor. To work |
| 74 // around this, indirect the macro for INSTANTIATE_TEST_CASE_P, so that the | 61 // around this, indirect the macro for INSTANTIATE_TEST_CASE_P, so that the |
| 75 // pre-processor will expand macros such as MAYBE_test_name before | 62 // pre-processor will expand macros such as MAYBE_test_name before |
| 76 // instantiating the test. | 63 // instantiating the test. |
| 77 #define WRAPPED_INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \ | 64 #define WRAPPED_INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \ |
| 78 INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) | 65 INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) |
| 79 | 66 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 ::testing::Values( | 183 ::testing::Values( |
| 197 TestParameter(NOT_IN_GUEST_MODE, | 184 TestParameter(NOT_IN_GUEST_MODE, |
| 198 "deleteMenuItemIsDisabledWhenNoItemIsSelected"), | 185 "deleteMenuItemIsDisabledWhenNoItemIsSelected"), |
| 199 TestParameter(NOT_IN_GUEST_MODE, "deleteOneItemFromToolbar"))); | 186 TestParameter(NOT_IN_GUEST_MODE, "deleteOneItemFromToolbar"))); |
| 200 | 187 |
| 201 WRAPPED_INSTANTIATE_TEST_CASE_P( | 188 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 202 DISABLED_QuickView, | 189 DISABLED_QuickView, |
| 203 FileManagerBrowserTest, | 190 FileManagerBrowserTest, |
| 204 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "openQuickView"))); | 191 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "openQuickView"))); |
| 205 | 192 |
| 206 WRAPPED_INSTANTIATE_TEST_CASE_P( | |
| 207 DetailsPanel, | |
| 208 FileManagerDetailsPanelBrowserTest, | |
| 209 ::testing::Values( | |
| 210 TestParameter(NOT_IN_GUEST_MODE, "openDetailsPanel"), | |
| 211 TestParameter(NOT_IN_GUEST_MODE, "openDetailsPanelForSingleFile"), | |
| 212 TestParameter(NOT_IN_GUEST_MODE, "openSingleFileAndSeeDetailsPanel"))); | |
| 213 | |
| 214 #if defined(DISABLE_SLOW_FILESAPP_TESTS) | 193 #if defined(DISABLE_SLOW_FILESAPP_TESTS) |
| 215 #define MAYBE_DirectoryTreeContextMenu DISABLED_DirectoryTreeContextMenu | 194 #define MAYBE_DirectoryTreeContextMenu DISABLED_DirectoryTreeContextMenu |
| 216 #else | 195 #else |
| 217 #define MAYBE_DirectoryTreeContextMenu DirectoryTreeContextMenu | 196 #define MAYBE_DirectoryTreeContextMenu DirectoryTreeContextMenu |
| 218 #endif | 197 #endif |
| 219 WRAPPED_INSTANTIATE_TEST_CASE_P( | 198 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 220 MAYBE_DirectoryTreeContextMenu, | 199 MAYBE_DirectoryTreeContextMenu, |
| 221 FileManagerBrowserTest, | 200 FileManagerBrowserTest, |
| 222 ::testing::Values( | 201 ::testing::Values( |
| 223 TestParameter(NOT_IN_GUEST_MODE, | 202 TestParameter(NOT_IN_GUEST_MODE, |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 | 696 |
| 718 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, MAYBE_BasicDrive) { | 697 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, MAYBE_BasicDrive) { |
| 719 AddAllUsers(); | 698 AddAllUsers(); |
| 720 | 699 |
| 721 // Sanity check that normal operations work in multi-profile setting as well. | 700 // Sanity check that normal operations work in multi-profile setting as well. |
| 722 set_test_case_name("keyboardCopyDrive"); | 701 set_test_case_name("keyboardCopyDrive"); |
| 723 StartTest(); | 702 StartTest(); |
| 724 } | 703 } |
| 725 | 704 |
| 726 } // namespace file_manager | 705 } // namespace file_manager |
| OLD | NEW |