| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/drive/drive_file_system.h" | 5 #include "chrome/browser/chromeos/drive/drive_file_system.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 | 738 |
| 739 TEST_F(DriveFileSystemTest, ReadDirectoryByPath_NonRootDirectory) { | 739 TEST_F(DriveFileSystemTest, ReadDirectoryByPath_NonRootDirectory) { |
| 740 // ReadDirectoryByPath() should kick off the resource list loading. | 740 // ReadDirectoryByPath() should kick off the resource list loading. |
| 741 scoped_ptr<DriveEntryProtoVector> entries( | 741 scoped_ptr<DriveEntryProtoVector> entries( |
| 742 ReadDirectoryByPathSync( | 742 ReadDirectoryByPathSync( |
| 743 base::FilePath::FromUTF8Unsafe("drive/Directory 1"))); | 743 base::FilePath::FromUTF8Unsafe("drive/Directory 1"))); |
| 744 // The non root directory should also be read correctly. | 744 // The non root directory should also be read correctly. |
| 745 // There was a bug (crbug.com/181487), which broke this behavior. | 745 // There was a bug (crbug.com/181487), which broke this behavior. |
| 746 // Make sure this is fixed. | 746 // Make sure this is fixed. |
| 747 ASSERT_TRUE(entries.get()); | 747 ASSERT_TRUE(entries.get()); |
| 748 EXPECT_EQ(2U, entries->size()); | 748 EXPECT_EQ(3U, entries->size()); |
| 749 } | 749 } |
| 750 | 750 |
| 751 TEST_F(DriveFileSystemTest, FilePathTests) { | 751 TEST_F(DriveFileSystemTest, FilePathTests) { |
| 752 ASSERT_TRUE(LoadRootFeedDocument()); | 752 ASSERT_TRUE(LoadRootFeedDocument()); |
| 753 | 753 |
| 754 EXPECT_TRUE( | 754 EXPECT_TRUE( |
| 755 EntryExists(base::FilePath(FILE_PATH_LITERAL("drive/File 1.txt")))); | 755 EntryExists(base::FilePath(FILE_PATH_LITERAL("drive/File 1.txt")))); |
| 756 EXPECT_TRUE( | 756 EXPECT_TRUE( |
| 757 EntryExists(base::FilePath(FILE_PATH_LITERAL("drive/Directory 1")))); | 757 EntryExists(base::FilePath(FILE_PATH_LITERAL("drive/Directory 1")))); |
| 758 EXPECT_TRUE(EntryExists( | 758 EXPECT_TRUE(EntryExists( |
| (...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2175 | 2175 |
| 2176 // An app for foo.exe should now be found, as the registry was loaded. | 2176 // An app for foo.exe should now be found, as the registry was loaded. |
| 2177 drive_webapps_registry_->GetWebAppsForFile( | 2177 drive_webapps_registry_->GetWebAppsForFile( |
| 2178 base::FilePath(FILE_PATH_LITERAL("foo.exe")), | 2178 base::FilePath(FILE_PATH_LITERAL("foo.exe")), |
| 2179 "" /* mime_type */, | 2179 "" /* mime_type */, |
| 2180 &apps); | 2180 &apps); |
| 2181 EXPECT_EQ(1U, apps.size()); | 2181 EXPECT_EQ(1U, apps.size()); |
| 2182 } | 2182 } |
| 2183 | 2183 |
| 2184 } // namespace drive | 2184 } // namespace drive |
| OLD | NEW |