| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 const char* target_name; // Target file or directory name. | 53 const char* target_name; // Target file or directory name. |
| 54 const char* mime_type; | 54 const char* mime_type; |
| 55 SharedOption shared_option; | 55 SharedOption shared_option; |
| 56 const char* last_modified_time_as_string; | 56 const char* last_modified_time_as_string; |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 TestEntryInfo kTestEntrySetCommon[] = { | 59 TestEntryInfo kTestEntrySetCommon[] = { |
| 60 { FILE, "text.txt", "hello.txt", "text/plain", NONE, "4 Sep 1998 12:34:56" }, | 60 { FILE, "text.txt", "hello.txt", "text/plain", NONE, "4 Sep 1998 12:34:56" }, |
| 61 { FILE, "image.png", "My Desktop Background.png", "text/plain", NONE, | 61 { FILE, "image.png", "My Desktop Background.png", "text/plain", NONE, |
| 62 "18 Jan 2038 01:02:03" }, | 62 "18 Jan 2038 01:02:03" }, |
| 63 { FILE, "music.ogg", "Beautiful Song.ogg", "text/plain", NONE, |
| 64 "12 Nov 2086 12:00:00" }, |
| 63 { FILE, "video.ogv", "world.ogv", "text/plain", NONE, | 65 { FILE, "video.ogv", "world.ogv", "text/plain", NONE, |
| 64 "4 July 2012 10:35:00" }, | 66 "4 July 2012 10:35:00" }, |
| 65 { DIRECTORY, "", "photos", NULL, NONE, "1 Jan 1980 23:59:59" }, | 67 { DIRECTORY, "", "photos", NULL, NONE, "1 Jan 1980 23:59:59" }, |
| 66 { DIRECTORY, "", ".warez", NULL, NONE, "26 Oct 1985 13:39" } | 68 { DIRECTORY, "", ".warez", NULL, NONE, "26 Oct 1985 13:39" } |
| 67 }; | 69 }; |
| 68 | 70 |
| 69 TestEntryInfo kTestEntrySetDriveOnly[] = { | 71 TestEntryInfo kTestEntrySetDriveOnly[] = { |
| 70 { FILE, "", "Test Document", "application/vnd.google-apps.document", NONE, | 72 { FILE, "", "Test Document", "application/vnd.google-apps.document", NONE, |
| 71 "10 Apr 2013 16:20:00" }, | 73 "10 Apr 2013 16:20:00" }, |
| 72 { FILE, "", "Test Shared Document", "application/vnd.google-apps.document", | 74 { FILE, "", "Test Shared Document", "application/vnd.google-apps.document", |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 // Creates test files and directories. | 329 // Creates test files and directories. |
| 328 void CreateTestEntries(TestVolume* volume, const TestEntryInfo* entries, | 330 void CreateTestEntries(TestVolume* volume, const TestEntryInfo* entries, |
| 329 size_t num_entries); | 331 size_t num_entries); |
| 330 | 332 |
| 331 // Runs the file display test on the passed |volume|, shared by subclasses. | 333 // Runs the file display test on the passed |volume|, shared by subclasses. |
| 332 void DoTestFileDisplay(TestVolume* volume); | 334 void DoTestFileDisplay(TestVolume* volume); |
| 333 | 335 |
| 334 // Runs the gallery open test on the passed |volume|, shared by subclasses. | 336 // Runs the gallery open test on the passed |volume|, shared by subclasses. |
| 335 void DoTestGalleryOpen(TestVolume* volume); | 337 void DoTestGalleryOpen(TestVolume* volume); |
| 336 | 338 |
| 339 // Runs the audio open test on the passed |volume|, shared by subclasses. |
| 340 void DoTestAudioOpen(TestVolume* volume); |
| 341 |
| 337 // Runs the keyboard copy test on the passed |volume|, shared by subclasses. | 342 // Runs the keyboard copy test on the passed |volume|, shared by subclasses. |
| 338 void DoTestKeyboardCopy(TestVolume* volume); | 343 void DoTestKeyboardCopy(TestVolume* volume); |
| 339 | 344 |
| 340 // Runs the keyboard delete test on the passed |volume|, shared by subclasses. | 345 // Runs the keyboard delete test on the passed |volume|, shared by subclasses. |
| 341 void DoTestKeyboardDelete(TestVolume* volume); | 346 void DoTestKeyboardDelete(TestVolume* volume); |
| 342 }; | 347 }; |
| 343 | 348 |
| 344 void FileManagerBrowserTestBase::SetUpCommandLine(CommandLine* command_line) { | 349 void FileManagerBrowserTestBase::SetUpCommandLine(CommandLine* command_line) { |
| 345 bool in_guest_mode = GetParam(); | 350 bool in_guest_mode = GetParam(); |
| 346 if (in_guest_mode) { | 351 if (in_guest_mode) { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 } | 497 } |
| 493 | 498 |
| 494 // Disabled temporarily since fails on Linux Chromium OS ASAN Tests (2). | 499 // Disabled temporarily since fails on Linux Chromium OS ASAN Tests (2). |
| 495 // TODO(mtomasz): crbug.com/243611. | 500 // TODO(mtomasz): crbug.com/243611. |
| 496 IN_PROC_BROWSER_TEST_P(FileManagerBrowserDriveTest, DISABLED_TestGalleryOpen) { | 501 IN_PROC_BROWSER_TEST_P(FileManagerBrowserDriveTest, DISABLED_TestGalleryOpen) { |
| 497 ResultCatcher catcher; | 502 ResultCatcher catcher; |
| 498 ASSERT_NO_FATAL_FAILURE(StartTest("galleryOpenDrive")); | 503 ASSERT_NO_FATAL_FAILURE(StartTest("galleryOpenDrive")); |
| 499 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 504 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 500 } | 505 } |
| 501 | 506 |
| 507 IN_PROC_BROWSER_TEST_P(FileManagerBrowserLocalTest, TestAudioOpen) { |
| 508 ResultCatcher catcher; |
| 509 ASSERT_NO_FATAL_FAILURE(StartTest("galleryOpenDownloads")); |
| 510 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();} |
| 511 |
| 512 IN_PROC_BROWSER_TEST_P(FileManagerBrowserDriveTest, TestAudioOpen) { |
| 513 ResultCatcher catcher; |
| 514 ASSERT_NO_FATAL_FAILURE(StartTest("galleryOpenDrive")); |
| 515 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();} |
| 516 |
| 502 IN_PROC_BROWSER_TEST_P(FileManagerBrowserDriveTest, TestKeyboardCopy) { | 517 IN_PROC_BROWSER_TEST_P(FileManagerBrowserDriveTest, TestKeyboardCopy) { |
| 503 ResultCatcher catcher; | 518 ResultCatcher catcher; |
| 504 ASSERT_NO_FATAL_FAILURE(StartTest("keyboardCopyDrive")); | 519 ASSERT_NO_FATAL_FAILURE(StartTest("keyboardCopyDrive")); |
| 505 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 520 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 506 } | 521 } |
| 507 | 522 |
| 508 IN_PROC_BROWSER_TEST_P(FileManagerBrowserDriveTest, TestKeyboardDelete) { | 523 IN_PROC_BROWSER_TEST_P(FileManagerBrowserDriveTest, TestKeyboardDelete) { |
| 509 ResultCatcher catcher; | 524 ResultCatcher catcher; |
| 510 ASSERT_NO_FATAL_FAILURE(StartTest("keyboardDeleteDrive")); | 525 ASSERT_NO_FATAL_FAILURE(StartTest("keyboardDeleteDrive")); |
| 511 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 526 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 } | 600 } |
| 586 | 601 |
| 587 IN_PROC_BROWSER_TEST_P(FileManagerBrowserTransferTest, | 602 IN_PROC_BROWSER_TEST_P(FileManagerBrowserTransferTest, |
| 588 TransferFromOfflineToDrive) { | 603 TransferFromOfflineToDrive) { |
| 589 ResultCatcher catcher; | 604 ResultCatcher catcher; |
| 590 ASSERT_NO_FATAL_FAILURE(StartTest("transferFromOfflineToDrive")); | 605 ASSERT_NO_FATAL_FAILURE(StartTest("transferFromOfflineToDrive")); |
| 591 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 606 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 592 } | 607 } |
| 593 | 608 |
| 594 } // namespace | 609 } // namespace |
| OLD | NEW |