Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Side by Side Diff: chrome/browser/platform_util_unittest.cc

Issue 2450713002: arc: Register ARC content file system (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/platform_util.h" 5 #include "chrome/browser/platform_util.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 public: 48 public:
49 void GetAdditionalFileSystemBackends( 49 void GetAdditionalFileSystemBackends(
50 content::BrowserContext* browser_context, 50 content::BrowserContext* browser_context,
51 const base::FilePath& storage_partition_path, 51 const base::FilePath& storage_partition_path,
52 ScopedVector<storage::FileSystemBackend>* additional_backends) override { 52 ScopedVector<storage::FileSystemBackend>* additional_backends) override {
53 storage::ExternalMountPoints* external_mount_points = 53 storage::ExternalMountPoints* external_mount_points =
54 content::BrowserContext::GetMountPoints(browser_context); 54 content::BrowserContext::GetMountPoints(browser_context);
55 55
56 // New FileSystemBackend that uses our MockSpecialStoragePolicy. 56 // New FileSystemBackend that uses our MockSpecialStoragePolicy.
57 chromeos::FileSystemBackend* backend = new chromeos::FileSystemBackend( 57 chromeos::FileSystemBackend* backend = new chromeos::FileSystemBackend(
58 nullptr, nullptr, nullptr, external_mount_points, 58 nullptr, nullptr, nullptr, nullptr, external_mount_points,
59 storage::ExternalMountPoints::GetSystemInstance()); 59 storage::ExternalMountPoints::GetSystemInstance());
60 additional_backends->push_back(backend); 60 additional_backends->push_back(backend);
61 } 61 }
62 }; 62 };
63 63
64 // Base test fixture class to be used on Chrome OS. 64 // Base test fixture class to be used on Chrome OS.
65 class PlatformUtilTestBase : public BrowserWithTestWindowTest { 65 class PlatformUtilTestBase : public BrowserWithTestWindowTest {
66 protected: 66 protected:
67 void SetUpPlatformFixture(const base::FilePath& test_directory) { 67 void SetUpPlatformFixture(const base::FilePath& test_directory) {
68 content_browser_client_.reset(new PlatformUtilTestContentBrowserClient()); 68 content_browser_client_.reset(new PlatformUtilTestContentBrowserClient());
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 TEST_F(PlatformUtilPosixTest, OpenFolderWithPosixSymlinks) { 286 TEST_F(PlatformUtilPosixTest, OpenFolderWithPosixSymlinks) {
287 EXPECT_EQ(OPEN_SUCCEEDED, CallOpenItem(symlink_to_folder_, OPEN_FOLDER)); 287 EXPECT_EQ(OPEN_SUCCEEDED, CallOpenItem(symlink_to_folder_, OPEN_FOLDER));
288 EXPECT_EQ(OPEN_FAILED_INVALID_TYPE, 288 EXPECT_EQ(OPEN_FAILED_INVALID_TYPE,
289 CallOpenItem(symlink_to_file_, OPEN_FOLDER)); 289 CallOpenItem(symlink_to_file_, OPEN_FOLDER));
290 EXPECT_EQ(OPEN_FAILED_PATH_NOT_FOUND, 290 EXPECT_EQ(OPEN_FAILED_PATH_NOT_FOUND,
291 CallOpenItem(symlink_to_nowhere_, OPEN_FOLDER)); 291 CallOpenItem(symlink_to_nowhere_, OPEN_FOLDER));
292 } 292 }
293 #endif // OS_POSIX && !OS_CHROMEOS 293 #endif // OS_POSIX && !OS_CHROMEOS
294 294
295 } // namespace platform_util 295 } // namespace platform_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698