Chromium Code Reviews| Index: chrome/browser/chromeos/extensions/file_manager/file_manager_browsertest.cc |
| diff --git a/chrome/browser/chromeos/extensions/file_manager/file_manager_browsertest.cc b/chrome/browser/chromeos/extensions/file_manager/file_manager_browsertest.cc |
| index bd78b7595163450afe346f65e5ba3c98668f21e9..62e73e2bb20efdb3b927a17ac33c0b7678c687ce 100644 |
| --- a/chrome/browser/chromeos/extensions/file_manager/file_manager_browsertest.cc |
| +++ b/chrome/browser/chromeos/extensions/file_manager/file_manager_browsertest.cc |
| @@ -469,6 +469,7 @@ class FileManagerBrowserDriveTest : public FileManagerBrowserTestBase, |
| virtual void CreateTestFileWithMimeType(const std::string& name, |
| const std::string& mime_type, |
| int64 length, |
| + bool sharedWithMe, |
| const std::string& modification_time); |
| // Waits until a notification for a directory change is received. |
| @@ -509,13 +510,15 @@ void FileManagerBrowserDriveTest::CreateTestFile( |
| const std::string& name, |
| int64 length, |
| const std::string& modification_time) { |
| - CreateTestFileWithMimeType(name, "text/plain", length, modification_time); |
| + CreateTestFileWithMimeType(name, "text/plain", length, false, |
|
mtomasz
2013/04/18 09:46:03
Add a comment what is this false or use enum.
Haruki Sato
2013/04/18 11:33:44
Done.
|
| + modification_time); |
| } |
| void FileManagerBrowserDriveTest::CreateTestFileWithMimeType( |
| const std::string& name, |
| const std::string& mime_type, |
| int64 length, |
| + bool sharedWithMe, |
|
mtomasz
2013/04/18 09:46:03
sharedWithMe -> shared_with_me here and in other p
Haruki Sato
2013/04/18 11:33:44
Done.
|
| const std::string& modification_time) { |
| google_apis::GDataErrorCode error = google_apis::GDATA_OTHER_ERROR; |
| scoped_ptr<google_apis::ResourceEntry> resource_entry; |
| @@ -524,6 +527,7 @@ void FileManagerBrowserDriveTest::CreateTestFileWithMimeType( |
| length, |
| fake_drive_service_->GetRootResourceId(), |
| name, |
| + sharedWithMe, |
| google_apis::test_util::CreateCopyResultCallback(&error, |
| &resource_entry)); |
| MessageLoop::current()->RunUntilIdle(); |
| @@ -671,11 +675,16 @@ FileManagerBrowserDriveTest::CreateDriveSystemService(Profile* profile) { |
| // For testing Drive, create more entries with Drive specific attributes. |
| // TODO(haruki): Add a case for an entry cached by DriveCache. |
| - // TODO(haruki): Add a case for a shared-with-me entry. |
| CreateTestFileWithMimeType("Test Document", |
| "application/vnd.google-apps.document", |
| 0, |
| + false, |
| "10 Apr 2013 16:20:00"); |
| + CreateTestFileWithMimeType("Test Shared Document", |
| + "application/vnd.google-apps.document", |
| + 0, |
| + true, |
| + "20 Mar 2013 22:40:00"); |
| system_service_ = new drive::DriveSystemService(profile, |
| fake_drive_service_, |
| @@ -730,19 +739,27 @@ IN_PROC_BROWSER_TEST_P(FileManagerBrowserDriveTest, TestOpenRecent) { |
| ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| } |
| -IN_PROC_BROWSER_TEST_P(FileManagerBrowserDriveTest, TestAutocomplete) { |
| +IN_PROC_BROWSER_TEST_P(FileManagerBrowserDriveTest, TestOpenOffline) { |
| drive_test_util::WaitUntilDriveMountPointIsAdded(browser()->profile()); |
| ResultCatcher catcher; |
| - StartTest("autocomplete"); |
| + StartTest("openSidebarOffline"); |
| ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| } |
| -IN_PROC_BROWSER_TEST_P(FileManagerBrowserDriveTest, TestOpenOffline) { |
| +IN_PROC_BROWSER_TEST_P(FileManagerBrowserDriveTest, TestOpenSharedWithMe) { |
| drive_test_util::WaitUntilDriveMountPointIsAdded(browser()->profile()); |
| ResultCatcher catcher; |
| - StartTest("openSidebarOffline"); |
| + StartTest("openSidebarSharedWithMe"); |
| + ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| +} |
| + |
| +IN_PROC_BROWSER_TEST_P(FileManagerBrowserDriveTest, TestAutocomplete) { |
| + drive_test_util::WaitUntilDriveMountPointIsAdded(browser()->profile()); |
| + |
| + ResultCatcher catcher; |
| + StartTest("autocomplete"); |
| ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| } |