| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 } | 382 } |
| 383 } | 383 } |
| 384 | 384 |
| 385 // Creates an empty directory with the given |name| and |modification_time|. | 385 // Creates an empty directory with the given |name| and |modification_time|. |
| 386 void CreateDirectory(const std::string& parent_id, | 386 void CreateDirectory(const std::string& parent_id, |
| 387 const std::string& target_name, | 387 const std::string& target_name, |
| 388 const base::Time& modification_time) { | 388 const base::Time& modification_time) { |
| 389 google_apis::DriveApiErrorCode error = google_apis::DRIVE_OTHER_ERROR; | 389 google_apis::DriveApiErrorCode error = google_apis::DRIVE_OTHER_ERROR; |
| 390 scoped_ptr<google_apis::FileResource> entry; | 390 scoped_ptr<google_apis::FileResource> entry; |
| 391 fake_drive_service_->AddNewDirectory( | 391 fake_drive_service_->AddNewDirectory( |
| 392 parent_id, | 392 parent_id, target_name, drive::AddNewDirectoryOptions(), |
| 393 target_name, | |
| 394 drive::DriveServiceInterface::AddNewDirectoryOptions(), | |
| 395 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); | 393 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); |
| 396 base::MessageLoop::current()->RunUntilIdle(); | 394 base::MessageLoop::current()->RunUntilIdle(); |
| 397 ASSERT_EQ(google_apis::HTTP_CREATED, error); | 395 ASSERT_EQ(google_apis::HTTP_CREATED, error); |
| 398 ASSERT_TRUE(entry); | 396 ASSERT_TRUE(entry); |
| 399 | 397 |
| 400 fake_drive_service_->SetLastModifiedTime( | 398 fake_drive_service_->SetLastModifiedTime( |
| 401 entry->file_id(), | 399 entry->file_id(), |
| 402 modification_time, | 400 modification_time, |
| 403 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); | 401 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); |
| 404 base::MessageLoop::current()->RunUntilIdle(); | 402 base::MessageLoop::current()->RunUntilIdle(); |
| (...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1503 StartTest(); | 1501 StartTest(); |
| 1504 } | 1502 } |
| 1505 | 1503 |
| 1506 IN_PROC_BROWSER_TEST_F(VideoPlayerBrowserTest, OpenSingleVideoOnDrive) { | 1504 IN_PROC_BROWSER_TEST_F(VideoPlayerBrowserTest, OpenSingleVideoOnDrive) { |
| 1507 set_test_case_name("openSingleVideoOnDrive"); | 1505 set_test_case_name("openSingleVideoOnDrive"); |
| 1508 StartTest(); | 1506 StartTest(); |
| 1509 } | 1507 } |
| 1510 | 1508 |
| 1511 } // namespace | 1509 } // namespace |
| 1512 } // namespace file_manager | 1510 } // namespace file_manager |
| OLD | NEW |