| 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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 public FileManagerBrowserTestBase, | 739 public FileManagerBrowserTestBase, |
| 740 public ::testing::WithParamInterface<TestParameter> { | 740 public ::testing::WithParamInterface<TestParameter> { |
| 741 virtual GuestMode GetGuestModeParam() const OVERRIDE { | 741 virtual GuestMode GetGuestModeParam() const OVERRIDE { |
| 742 return std::tr1::get<0>(GetParam()); | 742 return std::tr1::get<0>(GetParam()); |
| 743 } | 743 } |
| 744 virtual const char* GetTestCaseNameParam() const OVERRIDE { | 744 virtual const char* GetTestCaseNameParam() const OVERRIDE { |
| 745 return std::tr1::get<1>(GetParam()); | 745 return std::tr1::get<1>(GetParam()); |
| 746 } | 746 } |
| 747 }; | 747 }; |
| 748 | 748 |
| 749 IN_PROC_BROWSER_TEST_P(FileManagerBrowserTest, Test) { | 749 // http://crbug.com/327719 |
| 750 IN_PROC_BROWSER_TEST_P(FileManagerBrowserTest, DISABLED_Test) { |
| 750 StartTest(); | 751 StartTest(); |
| 751 } | 752 } |
| 752 | 753 |
| 753 // Unlike TEST/TEST_F, which are macros that expand to further macros, | 754 // Unlike TEST/TEST_F, which are macros that expand to further macros, |
| 754 // INSTANTIATE_TEST_CASE_P is a macro that expands directly to code that | 755 // INSTANTIATE_TEST_CASE_P is a macro that expands directly to code that |
| 755 // stringizes the arguments. As a result, macros passed as parameters (such as | 756 // stringizes the arguments. As a result, macros passed as parameters (such as |
| 756 // prefix or test_case_name) will not be expanded by the preprocessor. To work | 757 // prefix or test_case_name) will not be expanded by the preprocessor. To work |
| 757 // around this, indirect the macro for INSTANTIATE_TEST_CASE_P, so that the | 758 // around this, indirect the macro for INSTANTIATE_TEST_CASE_P, so that the |
| 758 // pre-processor will expand macros such as MAYBE_test_name before | 759 // pre-processor will expand macros such as MAYBE_test_name before |
| 759 // instantiating the test. | 760 // instantiating the test. |
| 760 #define WRAPPED_INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \ | 761 #define WRAPPED_INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \ |
| 761 INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) | 762 INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) |
| 762 | 763 |
| 763 // Slow tests are disabled on debug build. http://crbug.com/327719 | 764 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 764 #if !defined(NDEBUG) | 765 #if !defined(NDEBUG) |
| 765 #define MAYBE_FileDisplay DISABLED_FileDisplay | 766 #define MAYBE_FileDisplay DISABLED_FileDisplay |
| 766 #else | 767 #else |
| 767 #define MAYBE_FileDisplay FileDisplay | 768 #define MAYBE_FileDisplay FileDisplay |
| 768 #endif | 769 #endif |
| 769 WRAPPED_INSTANTIATE_TEST_CASE_P( | 770 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 770 MAYBE_FileDisplay, | 771 MAYBE_FileDisplay, |
| 771 FileManagerBrowserTest, | 772 FileManagerBrowserTest, |
| 772 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "fileDisplayDownloads"), | 773 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "fileDisplayDownloads"), |
| 773 TestParameter(IN_GUEST_MODE, "fileDisplayDownloads"), | 774 TestParameter(IN_GUEST_MODE, "fileDisplayDownloads"), |
| 774 TestParameter(NOT_IN_GUEST_MODE, "fileDisplayDrive"), | 775 TestParameter(NOT_IN_GUEST_MODE, "fileDisplayDrive"), |
| 775 TestParameter(NOT_IN_GUEST_MODE, "fileDisplayMtp"))); | 776 TestParameter(NOT_IN_GUEST_MODE, "fileDisplayMtp"))); |
| 776 | 777 |
| 777 // Slow tests are disabled on debug build. http://crbug.com/327719 | 778 // http://crbug.com/327719 |
| 778 #if !defined(NDEBUG) | |
| 779 #define MAYBE_OpenZipFiles DISABLED_OpenZipFiles | |
| 780 #else | |
| 781 #define MAYBE_OpenZipFiles OpenZipFiles | |
| 782 #endif | |
| 783 WRAPPED_INSTANTIATE_TEST_CASE_P( | 779 WRAPPED_INSTANTIATE_TEST_CASE_P( |
| 784 MAYBE_OpenZipFiles, | 780 DISABLED_OpenZipFiles, |
| 785 FileManagerBrowserTest, | 781 FileManagerBrowserTest, |
| 786 ::testing::Values(TestParameter(IN_GUEST_MODE, "zipOpenDownloads"), | 782 ::testing::Values(TestParameter(IN_GUEST_MODE, "zipOpenDownloads"), |
| 787 TestParameter(NOT_IN_GUEST_MODE, "zipOpenDownloads"), | 783 TestParameter(NOT_IN_GUEST_MODE, "zipOpenDownloads"), |
| 788 TestParameter(NOT_IN_GUEST_MODE, "zipOpenDrive"))); | 784 TestParameter(NOT_IN_GUEST_MODE, "zipOpenDrive"))); |
| 789 | 785 |
| 790 // Slow tests are disabled on debug build. http://crbug.com/327719 | 786 // Slow tests are disabled on debug build. http://crbug.com/327719 |
| 791 #if !defined(NDEBUG) | 787 #if !defined(NDEBUG) |
| 792 #define MAYBE_OpenVideoFiles DISABLED_OpenVideoFiles | 788 #define MAYBE_OpenVideoFiles DISABLED_OpenVideoFiles |
| 793 #else | 789 #else |
| 794 #define MAYBE_OpenVideoFiles OpenVideoFiles | 790 #define MAYBE_OpenVideoFiles OpenVideoFiles |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 } | 1464 } |
| 1469 | 1465 |
| 1470 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, ExposureImageOnDrive) { | 1466 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, ExposureImageOnDrive) { |
| 1471 AddScript("gallery/photo_editor.js"); | 1467 AddScript("gallery/photo_editor.js"); |
| 1472 set_test_case_name("exposureImageOnDrive"); | 1468 set_test_case_name("exposureImageOnDrive"); |
| 1473 StartTest(); | 1469 StartTest(); |
| 1474 } | 1470 } |
| 1475 | 1471 |
| 1476 } // namespace | 1472 } // namespace |
| 1477 } // namespace file_manager | 1473 } // namespace file_manager |
| OLD | NEW |