| 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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 } | 747 } |
| 748 virtual const char* GetTestCaseNameParam() const OVERRIDE { | 748 virtual const char* GetTestCaseNameParam() const OVERRIDE { |
| 749 return std::tr1::get<1>(GetParam()); | 749 return std::tr1::get<1>(GetParam()); |
| 750 } | 750 } |
| 751 }; | 751 }; |
| 752 | 752 |
| 753 IN_PROC_BROWSER_TEST_P(FileManagerBrowserTest, Test) { | 753 IN_PROC_BROWSER_TEST_P(FileManagerBrowserTest, Test) { |
| 754 StartTest(); | 754 StartTest(); |
| 755 } | 755 } |
| 756 | 756 |
| 757 INSTANTIATE_TEST_CASE_P( | 757 // Unlike TEST/TEST_F, which are macros that expand to further macros, |
| 758 FileDisplay, | 758 // INSTANTIATE_TEST_CASE_P is a macro that expands directly to code that |
| 759 // stringizes the arguments. As a result, macros passed as parameters (such as |
| 760 // prefix or test_case_name) will not be expanded by the preprocessor. To work |
| 761 // around this, indirect the macro for INSTANTIATE_TEST_CASE_P, so that the |
| 762 // pre-processor will expand macros such as MAYBE_test_name before |
| 763 // instantiating the test. |
| 764 #define WRAPPED_INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \ |
| 765 INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) |
| 766 |
| 767 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 768 #if !defined(NDEBUG) |
| 769 #define MAYBE_FileDisplay DISABLED_FileDisplay |
| 770 #else |
| 771 #define MAYBE_FileDisplay FileDisplay |
| 772 #endif |
| 773 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 774 MAYBE_FileDisplay, |
| 759 FileManagerBrowserTest, | 775 FileManagerBrowserTest, |
| 760 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "fileDisplayDownloads"), | 776 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "fileDisplayDownloads"), |
| 761 TestParameter(IN_GUEST_MODE, "fileDisplayDownloads"), | 777 TestParameter(IN_GUEST_MODE, "fileDisplayDownloads"), |
| 762 TestParameter(NOT_IN_GUEST_MODE, "fileDisplayDrive"), | 778 TestParameter(NOT_IN_GUEST_MODE, "fileDisplayDrive"), |
| 763 TestParameter(NOT_IN_GUEST_MODE, "fileDisplayMtp"))); | 779 TestParameter(NOT_IN_GUEST_MODE, "fileDisplayMtp"))); |
| 764 | 780 |
| 765 INSTANTIATE_TEST_CASE_P( | 781 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 766 OpenZipFiles, | 782 #if !defined(NDEBUG) |
| 783 #define MAYBE_OpenZipFiles DISABLED_OpenZipFiles |
| 784 #else |
| 785 #define MAYBE_OpenZipFiles OpenZipFiles |
| 786 #endif |
| 787 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 788 MAYBE_OpenZipFiles, |
| 767 FileManagerBrowserTest, | 789 FileManagerBrowserTest, |
| 768 ::testing::Values(TestParameter(IN_GUEST_MODE, "zipOpenDownloads"), | 790 ::testing::Values(TestParameter(IN_GUEST_MODE, "zipOpenDownloads"), |
| 769 TestParameter(NOT_IN_GUEST_MODE, "zipOpenDownloads"), | 791 TestParameter(NOT_IN_GUEST_MODE, "zipOpenDownloads"), |
| 770 TestParameter(NOT_IN_GUEST_MODE, "zipOpenDrive"))); | 792 TestParameter(NOT_IN_GUEST_MODE, "zipOpenDrive"))); |
| 771 | 793 |
| 772 INSTANTIATE_TEST_CASE_P( | 794 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 773 OpenVideoFiles, | 795 #if !defined(NDEBUG) |
| 796 #define MAYBE_OpenVideoFiles DISABLED_OpenVideoFiles |
| 797 #else |
| 798 #define MAYBE_OpenVideoFiles OpenVideoFiles |
| 799 #endif |
| 800 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 801 MAYBE_OpenVideoFiles, |
| 774 FileManagerBrowserTest, | 802 FileManagerBrowserTest, |
| 775 ::testing::Values(TestParameter(IN_GUEST_MODE, "videoOpenDownloads"), | 803 ::testing::Values(TestParameter(IN_GUEST_MODE, "videoOpenDownloads"), |
| 776 TestParameter(NOT_IN_GUEST_MODE, "videoOpenDownloads"), | 804 TestParameter(NOT_IN_GUEST_MODE, "videoOpenDownloads"), |
| 777 TestParameter(NOT_IN_GUEST_MODE, "videoOpenDrive"))); | 805 TestParameter(NOT_IN_GUEST_MODE, "videoOpenDrive"))); |
| 778 | 806 |
| 779 INSTANTIATE_TEST_CASE_P( | 807 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 780 OpenAudioFiles, | 808 #if !defined(NDEBUG) |
| 809 #define MAYBE_OpenAudioFiles DISABLED_OpenAudioFiles |
| 810 #else |
| 811 #define MAYBE_OpenAudioFiles OpenAudioFiles |
| 812 #endif |
| 813 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 814 MAYBE_OpenAudioFiles, |
| 781 FileManagerBrowserTest, | 815 FileManagerBrowserTest, |
| 782 ::testing::Values( | 816 ::testing::Values( |
| 783 TestParameter(IN_GUEST_MODE, "audioOpenDownloads"), | 817 TestParameter(IN_GUEST_MODE, "audioOpenDownloads"), |
| 784 TestParameter(NOT_IN_GUEST_MODE, "audioOpenDownloads"), | 818 TestParameter(NOT_IN_GUEST_MODE, "audioOpenDownloads"), |
| 785 TestParameter(NOT_IN_GUEST_MODE, "audioOpenDrive"), | 819 TestParameter(NOT_IN_GUEST_MODE, "audioOpenDrive"), |
| 786 TestParameter(NOT_IN_GUEST_MODE, "audioAutoAdvanceDrive"), | 820 TestParameter(NOT_IN_GUEST_MODE, "audioAutoAdvanceDrive"), |
| 787 TestParameter(NOT_IN_GUEST_MODE, "audioRepeatSingleFileDrive"), | 821 TestParameter(NOT_IN_GUEST_MODE, "audioRepeatSingleFileDrive"), |
| 788 TestParameter(NOT_IN_GUEST_MODE, "audioNoRepeatSingleFileDrive"), | 822 TestParameter(NOT_IN_GUEST_MODE, "audioNoRepeatSingleFileDrive"), |
| 789 TestParameter(NOT_IN_GUEST_MODE, "audioRepeatMultipleFileDrive"), | 823 TestParameter(NOT_IN_GUEST_MODE, "audioRepeatMultipleFileDrive"), |
| 790 TestParameter(NOT_IN_GUEST_MODE, "audioNoRepeatMultipleFileDrive"))); | 824 TestParameter(NOT_IN_GUEST_MODE, "audioNoRepeatMultipleFileDrive"))); |
| 791 | 825 |
| 792 // Disabled due to frequent failure: http://crbug.com/377636 | 826 // Disabled due to frequent failure: http://crbug.com/377636 |
| 793 INSTANTIATE_TEST_CASE_P( | 827 INSTANTIATE_TEST_CASE_P( |
| 794 DISABLED_CreateNewFolder, | 828 DISABLED_CreateNewFolder, |
| 795 FileManagerBrowserTest, | 829 FileManagerBrowserTest, |
| 796 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, | 830 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, |
| 797 "createNewFolderAfterSelectFile"), | 831 "createNewFolderAfterSelectFile"), |
| 798 TestParameter(IN_GUEST_MODE, | 832 TestParameter(IN_GUEST_MODE, |
| 799 "createNewFolderDownloads"), | 833 "createNewFolderDownloads"), |
| 800 TestParameter(NOT_IN_GUEST_MODE, | 834 TestParameter(NOT_IN_GUEST_MODE, |
| 801 "createNewFolderDownloads"), | 835 "createNewFolderDownloads"), |
| 802 TestParameter(NOT_IN_GUEST_MODE, | 836 TestParameter(NOT_IN_GUEST_MODE, |
| 803 "createNewFolderDrive"))); | 837 "createNewFolderDrive"))); |
| 804 | 838 |
| 805 INSTANTIATE_TEST_CASE_P( | 839 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 806 KeyboardOperations, | 840 #if !defined(NDEBUG) |
| 841 #define MAYBE_KeyboardOperations DISABLED_KeyboardOperations |
| 842 #else |
| 843 #define MAYBE_KeyboardOperations KeyboardOperations |
| 844 #endif |
| 845 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 846 MAYBE_KeyboardOperations, |
| 807 FileManagerBrowserTest, | 847 FileManagerBrowserTest, |
| 808 ::testing::Values(TestParameter(IN_GUEST_MODE, "keyboardDeleteDownloads"), | 848 ::testing::Values(TestParameter(IN_GUEST_MODE, "keyboardDeleteDownloads"), |
| 809 TestParameter(NOT_IN_GUEST_MODE, | 849 TestParameter(NOT_IN_GUEST_MODE, |
| 810 "keyboardDeleteDownloads"), | 850 "keyboardDeleteDownloads"), |
| 811 TestParameter(NOT_IN_GUEST_MODE, "keyboardDeleteDrive"), | 851 TestParameter(NOT_IN_GUEST_MODE, "keyboardDeleteDrive"), |
| 812 TestParameter(IN_GUEST_MODE, "keyboardCopyDownloads"), | 852 TestParameter(IN_GUEST_MODE, "keyboardCopyDownloads"), |
| 813 TestParameter(NOT_IN_GUEST_MODE, "keyboardCopyDownloads"), | 853 TestParameter(NOT_IN_GUEST_MODE, "keyboardCopyDownloads"), |
| 814 TestParameter(NOT_IN_GUEST_MODE, "keyboardCopyDrive"), | 854 TestParameter(NOT_IN_GUEST_MODE, "keyboardCopyDrive"), |
| 815 TestParameter(IN_GUEST_MODE, | 855 TestParameter(IN_GUEST_MODE, "renameFileDownloads"), |
| 816 "renameFileDownloads"), | 856 TestParameter(NOT_IN_GUEST_MODE, "renameFileDownloads"), |
| 817 TestParameter(NOT_IN_GUEST_MODE, | 857 TestParameter(NOT_IN_GUEST_MODE, "renameFileDrive"))); |
| 818 "renameFileDownloads"), | |
| 819 TestParameter(NOT_IN_GUEST_MODE, | |
| 820 "renameFileDrive"))); | |
| 821 | 858 |
| 822 // Disabled due to frequent timeouts; http://crbug.com/370980. | 859 // Disabled due to frequent timeouts; http://crbug.com/370980. |
| 823 INSTANTIATE_TEST_CASE_P( | 860 INSTANTIATE_TEST_CASE_P( |
| 824 DISABLED_DriveSpecific, | 861 DISABLED_DriveSpecific, |
| 825 FileManagerBrowserTest, | 862 FileManagerBrowserTest, |
| 826 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "openSidebarRecent"), | 863 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "openSidebarRecent"), |
| 827 TestParameter(NOT_IN_GUEST_MODE, "openSidebarOffline"), | 864 TestParameter(NOT_IN_GUEST_MODE, "openSidebarOffline"), |
| 828 TestParameter(NOT_IN_GUEST_MODE, | 865 TestParameter(NOT_IN_GUEST_MODE, |
| 829 "openSidebarSharedWithMe"), | 866 "openSidebarSharedWithMe"), |
| 830 TestParameter(NOT_IN_GUEST_MODE, "autocomplete"))); | 867 TestParameter(NOT_IN_GUEST_MODE, "autocomplete"))); |
| 831 | 868 |
| 832 INSTANTIATE_TEST_CASE_P( | 869 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 833 Transfer, | 870 #if !defined(NDEBUG) |
| 871 #define MAYBE_Transfer DISABLED_Transfer |
| 872 #else |
| 873 #define MAYBE_Transfer Transfer |
| 874 #endif |
| 875 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 876 MAYBE_Transfer, |
| 834 FileManagerBrowserTest, | 877 FileManagerBrowserTest, |
| 835 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, | 878 ::testing::Values( |
| 836 "transferFromDriveToDownloads"), | 879 TestParameter(NOT_IN_GUEST_MODE, "transferFromDriveToDownloads"), |
| 837 TestParameter(NOT_IN_GUEST_MODE, | 880 TestParameter(NOT_IN_GUEST_MODE, "transferFromDownloadsToDrive"), |
| 838 "transferFromDownloadsToDrive"), | 881 TestParameter(NOT_IN_GUEST_MODE, "transferFromSharedToDownloads"), |
| 839 TestParameter(NOT_IN_GUEST_MODE, | 882 TestParameter(NOT_IN_GUEST_MODE, "transferFromSharedToDrive"), |
| 840 "transferFromSharedToDownloads"), | 883 TestParameter(NOT_IN_GUEST_MODE, "transferFromRecentToDownloads"), |
| 841 TestParameter(NOT_IN_GUEST_MODE, | 884 TestParameter(NOT_IN_GUEST_MODE, "transferFromRecentToDrive"), |
| 842 "transferFromSharedToDrive"), | 885 TestParameter(NOT_IN_GUEST_MODE, "transferFromOfflineToDownloads"), |
| 843 TestParameter(NOT_IN_GUEST_MODE, | 886 TestParameter(NOT_IN_GUEST_MODE, "transferFromOfflineToDrive"))); |
| 844 "transferFromRecentToDownloads"), | |
| 845 TestParameter(NOT_IN_GUEST_MODE, | |
| 846 "transferFromRecentToDrive"), | |
| 847 TestParameter(NOT_IN_GUEST_MODE, | |
| 848 "transferFromOfflineToDownloads"), | |
| 849 TestParameter(NOT_IN_GUEST_MODE, | |
| 850 "transferFromOfflineToDrive"))); | |
| 851 | 887 |
| 852 INSTANTIATE_TEST_CASE_P( | 888 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 853 RestorePrefs, | 889 #if !defined(NDEBUG) |
| 890 #define MAYBE_RestorePrefs DISABLED_RestorePrefs |
| 891 #else |
| 892 #define MAYBE_RestorePrefs RestorePrefs |
| 893 #endif |
| 894 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 895 MAYBE_RestorePrefs, |
| 854 FileManagerBrowserTest, | 896 FileManagerBrowserTest, |
| 855 ::testing::Values(TestParameter(IN_GUEST_MODE, "restoreSortColumn"), | 897 ::testing::Values(TestParameter(IN_GUEST_MODE, "restoreSortColumn"), |
| 856 TestParameter(NOT_IN_GUEST_MODE, "restoreSortColumn"), | 898 TestParameter(NOT_IN_GUEST_MODE, "restoreSortColumn"), |
| 857 TestParameter(IN_GUEST_MODE, "restoreCurrentView"), | 899 TestParameter(IN_GUEST_MODE, "restoreCurrentView"), |
| 858 TestParameter(NOT_IN_GUEST_MODE, "restoreCurrentView"))); | 900 TestParameter(NOT_IN_GUEST_MODE, "restoreCurrentView"))); |
| 859 | 901 |
| 860 INSTANTIATE_TEST_CASE_P( | 902 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 861 ShareDialog, | 903 #if !defined(NDEBUG) |
| 904 #define MAYBE_ShareDialog DISABLED_ShareDialog |
| 905 #else |
| 906 #define MAYBE_ShareDialog ShareDialog |
| 907 #endif |
| 908 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 909 MAYBE_ShareDialog, |
| 862 FileManagerBrowserTest, | 910 FileManagerBrowserTest, |
| 863 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "shareFile"), | 911 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "shareFile"), |
| 864 TestParameter(NOT_IN_GUEST_MODE, "shareDirectory"))); | 912 TestParameter(NOT_IN_GUEST_MODE, "shareDirectory"))); |
| 865 | 913 |
| 866 INSTANTIATE_TEST_CASE_P( | 914 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 867 RestoreGeometry, | 915 #if !defined(NDEBUG) |
| 916 #define MAYBE_RestoreGeometry DISABLED_RestoreGeometry |
| 917 #else |
| 918 #define MAYBE_RestoreGeometry RestoreGeometry |
| 919 #endif |
| 920 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 921 MAYBE_RestoreGeometry, |
| 868 FileManagerBrowserTest, | 922 FileManagerBrowserTest, |
| 869 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "restoreGeometry"), | 923 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "restoreGeometry"), |
| 870 TestParameter(IN_GUEST_MODE, "restoreGeometry"))); | 924 TestParameter(IN_GUEST_MODE, "restoreGeometry"))); |
| 871 | 925 |
| 872 INSTANTIATE_TEST_CASE_P( | 926 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 873 Traverse, | 927 #if !defined(NDEBUG) |
| 928 #define MAYBE_Traverse DISABLED_Traverse |
| 929 #else |
| 930 #define MAYBE_Traverse Traverse |
| 931 #endif |
| 932 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 933 MAYBE_Traverse, |
| 874 FileManagerBrowserTest, | 934 FileManagerBrowserTest, |
| 875 ::testing::Values(TestParameter(IN_GUEST_MODE, "traverseDownloads"), | 935 ::testing::Values(TestParameter(IN_GUEST_MODE, "traverseDownloads"), |
| 876 TestParameter(NOT_IN_GUEST_MODE, "traverseDownloads"), | 936 TestParameter(NOT_IN_GUEST_MODE, "traverseDownloads"), |
| 877 TestParameter(NOT_IN_GUEST_MODE, "traverseDrive"))); | 937 TestParameter(NOT_IN_GUEST_MODE, "traverseDrive"))); |
| 878 | 938 |
| 879 INSTANTIATE_TEST_CASE_P( | 939 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 880 SuggestAppDialog, | 940 #if !defined(NDEBUG) |
| 941 #define MAYBE_SuggestAppDialog DISABLED_SuggestAppDialog |
| 942 #else |
| 943 #define MAYBE_SuggestAppDialog SuggestAppDialog |
| 944 #endif |
| 945 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 946 MAYBE_SuggestAppDialog, |
| 881 FileManagerBrowserTest, | 947 FileManagerBrowserTest, |
| 882 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "suggestAppDialog"))); | 948 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "suggestAppDialog"))); |
| 883 | 949 |
| 884 INSTANTIATE_TEST_CASE_P( | 950 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 885 ExecuteDefaultTaskOnDownloads, | 951 #if !defined(NDEBUG) |
| 952 #define MAYBE_ExecuteDefaultTaskOnDownloads \ |
| 953 DISABLED_ExecuteDefaultTaskOnDownloads |
| 954 #else |
| 955 #define MAYBE_ExecuteDefaultTaskOnDownloads ExecuteDefaultTaskOnDownloads |
| 956 #endif |
| 957 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 958 MAYBE_ExecuteDefaultTaskOnDownloads, |
| 886 FileManagerBrowserTest, | 959 FileManagerBrowserTest, |
| 887 ::testing::Values( | 960 ::testing::Values( |
| 888 TestParameter(NOT_IN_GUEST_MODE, "executeDefaultTaskOnDownloads"), | 961 TestParameter(NOT_IN_GUEST_MODE, "executeDefaultTaskOnDownloads"), |
| 889 TestParameter(IN_GUEST_MODE, "executeDefaultTaskOnDownloads"))); | 962 TestParameter(IN_GUEST_MODE, "executeDefaultTaskOnDownloads"))); |
| 890 | 963 |
| 891 INSTANTIATE_TEST_CASE_P( | 964 INSTANTIATE_TEST_CASE_P( |
| 892 ExecuteDefaultTaskOnDrive, | 965 ExecuteDefaultTaskOnDrive, |
| 893 FileManagerBrowserTest, | 966 FileManagerBrowserTest, |
| 894 ::testing::Values( | 967 ::testing::Values( |
| 895 TestParameter(NOT_IN_GUEST_MODE, "executeDefaultTaskOnDrive"))); | 968 TestParameter(NOT_IN_GUEST_MODE, "executeDefaultTaskOnDrive"))); |
| 896 | 969 |
| 897 INSTANTIATE_TEST_CASE_P( | 970 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 898 NavigationList, | 971 #if !defined(NDEBUG) |
| 972 #define MAYBE_NavigationList DISABLED_NavigationList |
| 973 #else |
| 974 #define MAYBE_NavigationList NavigationList |
| 975 #endif |
| 976 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 977 MAYBE_NavigationList, |
| 899 FileManagerBrowserTest, | 978 FileManagerBrowserTest, |
| 900 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, | 979 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, |
| 901 "traverseNavigationList"))); | 980 "traverseNavigationList"))); |
| 902 | 981 |
| 903 // Unlike TEST/TEST_F, which are macros that expand to further macros, | 982 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 904 // INSTANTIATE_TEST_CASE_P is a macro that expands directly to code that | |
| 905 // stringizes the arguments. As a result, macros passed as parameters (such as | |
| 906 // prefix or test_case_name) will not be expanded by the preprocessor. To work | |
| 907 // around this, indirect the macro for INSTANTIATE_TEST_CASE_P, so that the | |
| 908 // pre-processor will expand macros such as MAYBE_test_name before | |
| 909 // instantiating the test. | |
| 910 #define WRAPPED_INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \ | |
| 911 INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) | |
| 912 | |
| 913 // This test is too slow to run in debug build. http://crbug.com/327719 | |
| 914 #if !defined(NDEBUG) | 983 #if !defined(NDEBUG) |
| 915 #define MAYBE_FolderShortcuts DISABLED_FolderShortcuts | 984 #define MAYBE_FolderShortcuts DISABLED_FolderShortcuts |
| 916 #else | 985 #else |
| 917 #define MAYBE_FolderShortcuts FolderShortcuts | 986 #define MAYBE_FolderShortcuts FolderShortcuts |
| 918 #endif | 987 #endif |
| 919 WRAPPED_INSTANTIATE_TEST_CASE_P( | 988 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 920 MAYBE_FolderShortcuts, | 989 MAYBE_FolderShortcuts, |
| 921 FileManagerBrowserTest, | 990 FileManagerBrowserTest, |
| 922 ::testing::Values( | 991 ::testing::Values( |
| 923 TestParameter(NOT_IN_GUEST_MODE, "traverseFolderShortcuts"), | 992 TestParameter(NOT_IN_GUEST_MODE, "traverseFolderShortcuts"), |
| 924 TestParameter(NOT_IN_GUEST_MODE, "addRemoveFolderShortcuts"))); | 993 TestParameter(NOT_IN_GUEST_MODE, "addRemoveFolderShortcuts"))); |
| 925 | 994 |
| 926 INSTANTIATE_TEST_CASE_P( | 995 INSTANTIATE_TEST_CASE_P( |
| 927 TabIndex, | 996 TabIndex, |
| 928 FileManagerBrowserTest, | 997 FileManagerBrowserTest, |
| 929 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "searchBoxFocus"))); | 998 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "searchBoxFocus"))); |
| 930 | 999 |
| 931 INSTANTIATE_TEST_CASE_P( | 1000 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 932 Thumbnails, | 1001 #if !defined(NDEBUG) |
| 1002 #define MAYBE_Thumbnails DISABLED_Thumbnails |
| 1003 #else |
| 1004 #define MAYBE_Thumbnails Thumbnails |
| 1005 #endif |
| 1006 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 1007 MAYBE_Thumbnails, |
| 933 FileManagerBrowserTest, | 1008 FileManagerBrowserTest, |
| 934 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "thumbnailsDownloads"), | 1009 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "thumbnailsDownloads"), |
| 935 TestParameter(IN_GUEST_MODE, "thumbnailsDownloads"))); | 1010 TestParameter(IN_GUEST_MODE, "thumbnailsDownloads"))); |
| 936 | 1011 |
| 937 // Test/4 has been failing every 3rd or 4th pass on the waterfall for | 1012 // Test/4 has been failing every 3rd or 4th pass on the waterfall for |
| 938 // "Linux ChromiumOS Tests (dbg)". | 1013 // "Linux ChromiumOS Tests (dbg)". |
| 939 // http://crbug.com/380339 | 1014 // http://crbug.com/380339 |
| 940 INSTANTIATE_TEST_CASE_P( | 1015 INSTANTIATE_TEST_CASE_P( |
| 941 DISABLED_CopyBetweenWindows, | 1016 DISABLED_CopyBetweenWindows, |
| 942 FileManagerBrowserTest, | 1017 FileManagerBrowserTest, |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 return list.size() == 1u ? | 1123 return list.size() == 1u ? |
| 1049 window_manager->GetUserPresentingWindow( | 1124 window_manager->GetUserPresentingWindow( |
| 1050 list.front()->GetNativeWindow()) : ""; | 1125 list.front()->GetNativeWindow()) : ""; |
| 1051 } | 1126 } |
| 1052 return FileManagerBrowserTestBase::OnMessage(name, value); | 1127 return FileManagerBrowserTestBase::OnMessage(name, value); |
| 1053 } | 1128 } |
| 1054 | 1129 |
| 1055 std::string test_case_name_; | 1130 std::string test_case_name_; |
| 1056 }; | 1131 }; |
| 1057 | 1132 |
| 1058 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, PRE_BasicDownloads) { | 1133 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 1134 #if !defined(NDEBUG) |
| 1135 #define MAYBE_PRE_BasicDownloads DISABLED_PRE_BasicDownloads |
| 1136 #define MAYBE_BasicDownloads DISABLED_BasicDownloads |
| 1137 #else |
| 1138 #define MAYBE_PRE_BasicDownloads PRE_BasicDownloads |
| 1139 #define MAYBE_BasicDownloads BasicDownloads |
| 1140 #endif |
| 1141 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, |
| 1142 MAYBE_PRE_BasicDownloads) { |
| 1059 AddAllUsers(); | 1143 AddAllUsers(); |
| 1060 } | 1144 } |
| 1061 | 1145 |
| 1062 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, BasicDownloads) { | 1146 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, |
| 1147 MAYBE_BasicDownloads) { |
| 1063 AddAllUsers(); | 1148 AddAllUsers(); |
| 1064 | 1149 |
| 1065 // Sanity check that normal operations work in multi-profile setting as well. | 1150 // Sanity check that normal operations work in multi-profile setting as well. |
| 1066 set_test_case_name("keyboardCopyDownloads"); | 1151 set_test_case_name("keyboardCopyDownloads"); |
| 1067 StartTest(); | 1152 StartTest(); |
| 1068 } | 1153 } |
| 1069 | 1154 |
| 1070 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, PRE_BasicDrive) { | 1155 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 1156 #if !defined(NDEBUG) |
| 1157 #define MAYBE_PRE_BasicDrive DISABLED_PRE_BasicDrive |
| 1158 #define MAYBE_BasicDrive DISABLED_BasicDrive |
| 1159 #else |
| 1160 #define MAYBE_PRE_BasicDrive PRE_BasicDrive |
| 1161 #define MAYBE_BasicDrive BasicDrive |
| 1162 #endif |
| 1163 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, |
| 1164 MAYBE_PRE_BasicDrive) { |
| 1071 AddAllUsers(); | 1165 AddAllUsers(); |
| 1072 } | 1166 } |
| 1073 | 1167 |
| 1074 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, BasicDrive) { | 1168 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, MAYBE_BasicDrive) { |
| 1075 AddAllUsers(); | 1169 AddAllUsers(); |
| 1076 | 1170 |
| 1077 // Sanity check that normal operations work in multi-profile setting as well. | 1171 // Sanity check that normal operations work in multi-profile setting as well. |
| 1078 set_test_case_name("keyboardCopyDrive"); | 1172 set_test_case_name("keyboardCopyDrive"); |
| 1079 StartTest(); | 1173 StartTest(); |
| 1080 } | 1174 } |
| 1081 | 1175 |
| 1082 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, PRE_Badge) { | 1176 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 1177 #if !defined(NDEBUG) |
| 1178 #define MAYBE_PRE_Badge DISABLED_PRE_Badge |
| 1179 #define MAYBE_Badge DISABLED_Badge |
| 1180 #else |
| 1181 #define MAYBE_PRE_Badge PRE_Badge |
| 1182 #define MAYBE_Badge Badge |
| 1183 #endif |
| 1184 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, MAYBE_PRE_Badge) { |
| 1083 AddAllUsers(); | 1185 AddAllUsers(); |
| 1084 } | 1186 } |
| 1085 | 1187 |
| 1086 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, Badge) { | 1188 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, MAYBE_Badge) { |
| 1087 // Test the profile badge to be correctly shown and hidden. | 1189 // Test the profile badge to be correctly shown and hidden. |
| 1088 set_test_case_name("multiProfileBadge"); | 1190 set_test_case_name("multiProfileBadge"); |
| 1089 StartTest(); | 1191 StartTest(); |
| 1090 } | 1192 } |
| 1091 | 1193 |
| 1194 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 1195 #if !defined(NDEBUG) |
| 1196 #define MAYBE_PRE_VisitDesktopMenu DISABLED_PRE_VisitDesktopMenu |
| 1197 #define MAYBE_VisitDesktopMenu DISABLED_VisitDesktopMenu |
| 1198 #else |
| 1199 #define MAYBE_PRE_VisitDesktopMenu PRE_VisitDesktopMenu |
| 1200 #define MAYBE_VisitDesktopMenu VisitDesktopMenu |
| 1201 #endif |
| 1092 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, | 1202 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, |
| 1093 PRE_VisitDesktopMenu) { | 1203 MAYBE_PRE_VisitDesktopMenu) { |
| 1094 AddAllUsers(); | 1204 AddAllUsers(); |
| 1095 } | 1205 } |
| 1096 | 1206 |
| 1097 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, VisitDesktopMenu) { | 1207 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, |
| 1208 MAYBE_VisitDesktopMenu) { |
| 1098 // Test for the menu item for visiting other profile's desktop. | 1209 // Test for the menu item for visiting other profile's desktop. |
| 1099 set_test_case_name("multiProfileVisitDesktopMenu"); | 1210 set_test_case_name("multiProfileVisitDesktopMenu"); |
| 1100 StartTest(); | 1211 StartTest(); |
| 1101 } | 1212 } |
| 1102 | 1213 |
| 1103 template<GuestMode M> | 1214 template<GuestMode M> |
| 1104 class GalleryBrowserTestBase : public FileManagerBrowserTestBase { | 1215 class GalleryBrowserTestBase : public FileManagerBrowserTestBase { |
| 1105 public: | 1216 public: |
| 1106 virtual GuestMode GetGuestModeParam() const OVERRIDE { return M; } | 1217 virtual GuestMode GetGuestModeParam() const OVERRIDE { return M; } |
| 1107 virtual const char* GetTestCaseNameParam() const OVERRIDE { | 1218 virtual const char* GetTestCaseNameParam() const OVERRIDE { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 } | 1269 } |
| 1159 | 1270 |
| 1160 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, OpenSingleImageOnDrive) { | 1271 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, OpenSingleImageOnDrive) { |
| 1161 AddScript("gallery/open_image_files.js"); | 1272 AddScript("gallery/open_image_files.js"); |
| 1162 set_test_case_name("openSingleImageOnDrive"); | 1273 set_test_case_name("openSingleImageOnDrive"); |
| 1163 StartTest(); | 1274 StartTest(); |
| 1164 } | 1275 } |
| 1165 | 1276 |
| 1166 } // namespace | 1277 } // namespace |
| 1167 } // namespace file_manager | 1278 } // namespace file_manager |
| OLD | NEW |