| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 file_util::CreateDirectory(local_path_); | 111 file_util::CreateDirectory(local_path_); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void CreateEntry(const TestEntryInfo& entry) { | 114 void CreateEntry(const TestEntryInfo& entry) { |
| 115 base::FilePath target_path = local_path_.AppendASCII(entry.target_name); | 115 base::FilePath target_path = local_path_.AppendASCII(entry.target_name); |
| 116 switch (entry.type) { | 116 switch (entry.type) { |
| 117 case FILE: { | 117 case FILE: { |
| 118 base::FilePath source_path = | 118 base::FilePath source_path = |
| 119 google_apis::test_util::GetTestFilePath("chromeos/file_manager"). | 119 google_apis::test_util::GetTestFilePath("chromeos/file_manager"). |
| 120 AppendASCII(entry.source_file_name); | 120 AppendASCII(entry.source_file_name); |
| 121 ASSERT_TRUE(file_util::CopyFile(source_path, target_path)) | 121 ASSERT_TRUE(base::CopyFile(source_path, target_path)) |
| 122 << "Copy from " << source_path.value() | 122 << "Copy from " << source_path.value() |
| 123 << " to " << target_path.value() << " failed."; | 123 << " to " << target_path.value() << " failed."; |
| 124 break; | 124 break; |
| 125 } | 125 } |
| 126 case DIRECTORY: | 126 case DIRECTORY: |
| 127 ASSERT_TRUE(file_util::CreateDirectory(target_path)) << | 127 ASSERT_TRUE(file_util::CreateDirectory(target_path)) << |
| 128 "Failed to create a directory: " << target_path.value(); | 128 "Failed to create a directory: " << target_path.value(); |
| 129 break; | 129 break; |
| 130 } | 130 } |
| 131 base::Time time; | 131 base::Time time; |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 TestParameter(NOT_IN_GUEST_MODE, "hideSearchBox"))); | 503 TestParameter(NOT_IN_GUEST_MODE, "hideSearchBox"))); |
| 504 | 504 |
| 505 INSTANTIATE_TEST_CASE_P( | 505 INSTANTIATE_TEST_CASE_P( |
| 506 RestorePrefs, | 506 RestorePrefs, |
| 507 FileManagerBrowserTest, | 507 FileManagerBrowserTest, |
| 508 ::testing::Values(TestParameter(IN_GUEST_MODE, "restoreSortColumn"), | 508 ::testing::Values(TestParameter(IN_GUEST_MODE, "restoreSortColumn"), |
| 509 TestParameter(NOT_IN_GUEST_MODE, "restoreSortColumn"), | 509 TestParameter(NOT_IN_GUEST_MODE, "restoreSortColumn"), |
| 510 TestParameter(IN_GUEST_MODE, "restoreCurrentView"), | 510 TestParameter(IN_GUEST_MODE, "restoreCurrentView"), |
| 511 TestParameter(NOT_IN_GUEST_MODE, "restoreCurrentView"))); | 511 TestParameter(NOT_IN_GUEST_MODE, "restoreCurrentView"))); |
| 512 } // namespace | 512 } // namespace |
| OLD | NEW |