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 // Browser test for basic Chrome OS file manager functionality: | 5 // Browser test for basic Chrome OS file manager functionality: |
6 // - The file list is updated when a file is added externally to the Downloads | 6 // - The file list is updated when a file is added externally to the Downloads |
7 // folder. | 7 // folder. |
8 // - Selecting a file and copy-pasting it with the keyboard copies the file. | 8 // - Selecting a file and copy-pasting it with the keyboard copies the file. |
9 // - Selecting a file and pressing delete deletes it. | 9 // - Selecting a file and pressing delete deletes it. |
10 | 10 |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 FileManagerBrowserTest, | 894 FileManagerBrowserTest, |
895 ::testing::Values( | 895 ::testing::Values( |
896 TestParameter(NOT_IN_GUEST_MODE, "executeDefaultTaskOnDrive"))); | 896 TestParameter(NOT_IN_GUEST_MODE, "executeDefaultTaskOnDrive"))); |
897 | 897 |
898 INSTANTIATE_TEST_CASE_P( | 898 INSTANTIATE_TEST_CASE_P( |
899 NavigationList, | 899 NavigationList, |
900 FileManagerBrowserTest, | 900 FileManagerBrowserTest, |
901 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, | 901 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, |
902 "traverseNavigationList"))); | 902 "traverseNavigationList"))); |
903 | 903 |
| 904 // Unlike TEST/TEST_F, which are macros that expand to further macros, |
| 905 // INSTANTIATE_TEST_CASE_P is a macro that expands directly to code that |
| 906 // stringizes the arguments. As a result, macros passed as parameters (such as |
| 907 // prefix or test_case_name) will not be expanded by the preprocessor. To work |
| 908 // around this, indirect the macro for INSTANTIATE_TEST_CASE_P, so that the |
| 909 // pre-processor will expand macros such as MAYBE_test_name before |
| 910 // instantiating the test. |
| 911 #define WRAPPED_INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \ |
| 912 INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) |
| 913 |
| 914 // This test is too slow to run in debug build. http://crbug.com/327719 |
| 915 #if !defined(NDEBUG) |
| 916 #define MAYBE_FolderShortcuts DISABLED_FolderShortcuts |
| 917 #else |
| 918 #define MAYBE_FolderShortcuts FolderShortcuts |
| 919 #endif |
| 920 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 921 MAYBE_FolderShortcuts, |
| 922 FileManagerBrowserTest, |
| 923 ::testing::Values( |
| 924 TestParameter(NOT_IN_GUEST_MODE, "traverseFolderShortcuts"), |
| 925 TestParameter(NOT_IN_GUEST_MODE, "addRemoveFolderShortcuts"))); |
| 926 |
904 INSTANTIATE_TEST_CASE_P( | 927 INSTANTIATE_TEST_CASE_P( |
905 TabIndex, | 928 TabIndex, |
906 FileManagerBrowserTest, | 929 FileManagerBrowserTest, |
907 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "searchBoxFocus"))); | 930 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "searchBoxFocus"))); |
908 | 931 |
909 INSTANTIATE_TEST_CASE_P( | 932 INSTANTIATE_TEST_CASE_P( |
910 Thumbnails, | 933 Thumbnails, |
911 FileManagerBrowserTest, | 934 FileManagerBrowserTest, |
912 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "thumbnailsDownloads"), | 935 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "thumbnailsDownloads"), |
913 TestParameter(IN_GUEST_MODE, "thumbnailsDownloads"))); | 936 TestParameter(IN_GUEST_MODE, "thumbnailsDownloads"))); |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 } | 1159 } |
1137 | 1160 |
1138 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, OpenSingleImageOnDrive) { | 1161 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, OpenSingleImageOnDrive) { |
1139 AddScript("gallery/open_image_files.js"); | 1162 AddScript("gallery/open_image_files.js"); |
1140 set_test_case_name("openSingleImageOnDrive"); | 1163 set_test_case_name("openSingleImageOnDrive"); |
1141 StartTest(); | 1164 StartTest(); |
1142 } | 1165 } |
1143 | 1166 |
1144 } // namespace | 1167 } // namespace |
1145 } // namespace file_manager | 1168 } // namespace file_manager |
OLD | NEW |