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 21 matching lines...) Expand all Loading... |
32 } | 32 } |
33 const char* GetTestCaseNameParam() const override { | 33 const char* GetTestCaseNameParam() const override { |
34 return std::tr1::get<1>(GetParam()); | 34 return std::tr1::get<1>(GetParam()); |
35 } | 35 } |
36 }; | 36 }; |
37 | 37 |
38 IN_PROC_BROWSER_TEST_P(FileManagerBrowserTest, Test) { | 38 IN_PROC_BROWSER_TEST_P(FileManagerBrowserTest, Test) { |
39 StartTest(); | 39 StartTest(); |
40 } | 40 } |
41 | 41 |
| 42 // Test fixture class for tests that rely on deprecated event dispatch that send |
| 43 // tests. |
| 44 class FileManagerBrowserTestWithLegacyEventDispatch |
| 45 : public FileManagerBrowserTest { |
| 46 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 47 FileManagerBrowserTest::SetUpCommandLine(command_line); |
| 48 command_line->AppendSwitchASCII("disable-blink-features", |
| 49 "TrustedEventsDefaultAction"); |
| 50 } |
| 51 }; |
| 52 |
| 53 IN_PROC_BROWSER_TEST_P(FileManagerBrowserTestWithLegacyEventDispatch, Test) { |
| 54 StartTest(); |
| 55 } |
| 56 |
42 // Test fixture class for details panel. | 57 // Test fixture class for details panel. |
43 // TODO(ryoh): remove after we release details panel feature. | 58 // TODO(ryoh): remove after we release details panel feature. |
44 class FileManagerDetailsPanelBrowserTest : public FileManagerBrowserTest { | 59 class FileManagerDetailsPanelBrowserTest : public FileManagerBrowserTest { |
45 void SetUpCommandLine(base::CommandLine* command_line) override { | 60 void SetUpCommandLine(base::CommandLine* command_line) override { |
46 FileManagerBrowserTestBase::SetUpCommandLine(command_line); | 61 FileManagerBrowserTest::SetUpCommandLine(command_line); |
47 command_line->AppendSwitch("--enable-files-details-panel"); | 62 command_line->AppendSwitch("--enable-files-details-panel"); |
48 } | 63 } |
49 }; | 64 }; |
50 | 65 |
51 IN_PROC_BROWSER_TEST_P(FileManagerDetailsPanelBrowserTest, Test) { | 66 IN_PROC_BROWSER_TEST_P(FileManagerDetailsPanelBrowserTest, Test) { |
52 StartTest(); | 67 StartTest(); |
53 } | 68 } |
54 | 69 |
55 // Unlike TEST/TEST_F, which are macros that expand to further macros, | 70 // Unlike TEST/TEST_F, which are macros that expand to further macros, |
56 // INSTANTIATE_TEST_CASE_P is a macro that expands directly to code that | 71 // INSTANTIATE_TEST_CASE_P is a macro that expands directly to code that |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "sortColumns"), | 433 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "sortColumns"), |
419 TestParameter(IN_GUEST_MODE, "sortColumns"))); | 434 TestParameter(IN_GUEST_MODE, "sortColumns"))); |
420 | 435 |
421 #if defined(DISABLE_SLOW_FILESAPP_TESTS) | 436 #if defined(DISABLE_SLOW_FILESAPP_TESTS) |
422 #define MAYBE_TabIndex DISABLED_TabIndex | 437 #define MAYBE_TabIndex DISABLED_TabIndex |
423 #else | 438 #else |
424 #define MAYBE_TabIndex TabIndex | 439 #define MAYBE_TabIndex TabIndex |
425 #endif | 440 #endif |
426 WRAPPED_INSTANTIATE_TEST_CASE_P( | 441 WRAPPED_INSTANTIATE_TEST_CASE_P( |
427 MAYBE_TabIndex, | 442 MAYBE_TabIndex, |
428 FileManagerBrowserTest, | 443 FileManagerBrowserTestWithLegacyEventDispatch, |
429 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "searchBoxFocus"))); | 444 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "searchBoxFocus"))); |
430 | 445 |
431 #if defined(DISABLE_SLOW_FILESAPP_TESTS) | 446 #if defined(DISABLE_SLOW_FILESAPP_TESTS) |
432 #define MAYBE_TabindexFocus DISABLED_TabindexFocus | 447 #define MAYBE_TabindexFocus DISABLED_TabindexFocus |
433 #else | 448 #else |
434 #define MAYBE_TabindexFocus TabindexFocus | 449 #define MAYBE_TabindexFocus TabindexFocus |
435 #endif | 450 #endif |
436 WRAPPED_INSTANTIATE_TEST_CASE_P( | 451 WRAPPED_INSTANTIATE_TEST_CASE_P( |
437 MAYBE_TabindexFocus, | 452 MAYBE_TabindexFocus, |
438 FileManagerBrowserTest, | 453 FileManagerBrowserTestWithLegacyEventDispatch, |
439 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "tabindexFocus"))); | 454 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "tabindexFocus"))); |
440 | 455 |
441 #if defined(DISABLE_SLOW_FILESAPP_TESTS) | 456 #if defined(DISABLE_SLOW_FILESAPP_TESTS) |
442 #define MAYBE_TabindexFocusDownloads DISABLED_TabindexFocusDownloads | 457 #define MAYBE_TabindexFocusDownloads DISABLED_TabindexFocusDownloads |
443 #else | 458 #else |
444 #define MAYBE_TabindexFocusDownloads TabindexFocusDownloads | 459 #define MAYBE_TabindexFocusDownloads TabindexFocusDownloads |
445 #endif | 460 #endif |
446 WRAPPED_INSTANTIATE_TEST_CASE_P( | 461 WRAPPED_INSTANTIATE_TEST_CASE_P( |
447 MAYBE_TabindexFocusDownloads, | 462 MAYBE_TabindexFocusDownloads, |
448 FileManagerBrowserTest, | 463 FileManagerBrowserTestWithLegacyEventDispatch, |
449 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, | 464 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, |
450 "tabindexFocusDownloads"), | 465 "tabindexFocusDownloads"), |
451 TestParameter(IN_GUEST_MODE, "tabindexFocusDownloads"))); | 466 TestParameter(IN_GUEST_MODE, "tabindexFocusDownloads"))); |
452 | 467 |
453 #if defined(DISABLE_SLOW_FILESAPP_TESTS) | 468 #if defined(DISABLE_SLOW_FILESAPP_TESTS) |
454 #define MAYBE_TabindexFocusDirectorySelected \ | 469 #define MAYBE_TabindexFocusDirectorySelected \ |
455 DISABLED_TabindexFocusDirectorySelected | 470 DISABLED_TabindexFocusDirectorySelected |
456 #else | 471 #else |
457 #define MAYBE_TabindexFocusDirectorySelected TabindexFocusDirectorySelected | 472 #define MAYBE_TabindexFocusDirectorySelected TabindexFocusDirectorySelected |
458 #endif | 473 #endif |
459 WRAPPED_INSTANTIATE_TEST_CASE_P( | 474 WRAPPED_INSTANTIATE_TEST_CASE_P( |
460 MAYBE_TabindexFocusDirectorySelected, | 475 MAYBE_TabindexFocusDirectorySelected, |
461 FileManagerBrowserTest, | 476 FileManagerBrowserTestWithLegacyEventDispatch, |
462 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, | 477 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, |
463 "tabindexFocusDirectorySelected"))); | 478 "tabindexFocusDirectorySelected"))); |
464 | 479 |
465 // Fails on official cros trunk build. http://crbug.com/480491 | 480 // Fails on official cros trunk build. http://crbug.com/480491 |
466 #if defined(DISABLE_SLOW_FILESAPP_TESTS) || defined(OFFICIAL_BUILD) | 481 #if defined(DISABLE_SLOW_FILESAPP_TESTS) || defined(OFFICIAL_BUILD) |
467 #define MAYBE_TabindexOpenDialog DISABLED_TabindexOpenDialog | 482 #define MAYBE_TabindexOpenDialog DISABLED_TabindexOpenDialog |
468 #else | 483 #else |
469 #define MAYBE_TabindexOpenDialog TabindexOpenDialog | 484 #define MAYBE_TabindexOpenDialog TabindexOpenDialog |
470 #endif | 485 #endif |
471 // Flaky: crbug.com/615259 | 486 // Flaky: crbug.com/615259 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 | 709 |
695 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, MAYBE_BasicDrive) { | 710 IN_PROC_BROWSER_TEST_F(MultiProfileFileManagerBrowserTest, MAYBE_BasicDrive) { |
696 AddAllUsers(); | 711 AddAllUsers(); |
697 | 712 |
698 // Sanity check that normal operations work in multi-profile setting as well. | 713 // Sanity check that normal operations work in multi-profile setting as well. |
699 set_test_case_name("keyboardCopyDrive"); | 714 set_test_case_name("keyboardCopyDrive"); |
700 StartTest(); | 715 StartTest(); |
701 } | 716 } |
702 | 717 |
703 } // namespace file_manager | 718 } // namespace file_manager |
OLD | NEW |