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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/mount_path_util_unittest.cc

Issue 210803003: [fsp] Decouple file_service_provider::Service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 8 months 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <string>
6
7 #include "base/files/file.h"
8 #include "chrome/browser/chromeos/file_system_provider/mount_path_util.h"
9 #include "chrome/browser/chromeos/login/fake_user_manager.h"
10 #include "chrome/test/base/testing_profile.h"
11 #include "content/public/test/test_browser_thread_bundle.h"
12 #include "testing/gtest/include/gtest/gtest.h"
13
14 namespace chromeos {
15 namespace file_system_provider {
16 namespace util {
17
18 class FileSystemProviderMountPathUtilTest : public testing::Test {
19 protected:
20 FileSystemProviderMountPathUtilTest() {}
21 virtual ~FileSystemProviderMountPathUtilTest() {}
22
23 virtual void SetUp() OVERRIDE {
24 user_manager_ = new FakeUserManager();
25 user_manager_enabler_.reset(new ScopedUserManagerEnabler(user_manager_));
26 profile_.reset(new TestingProfile);
27 user_manager_->AddUser(profile_->GetProfileName());
28 }
29
30 content::TestBrowserThreadBundle thread_bundle_;
31 scoped_ptr<TestingProfile> profile_;
32 scoped_ptr<ScopedUserManagerEnabler> user_manager_enabler_;
33 FakeUserManager* user_manager_;
34 };
35
36 TEST_F(FileSystemProviderMountPathUtilTest, GetMountPointPath) {
37 const std::string kExtensionId = "mbflcebpggnecokmikipoihdbecnjfoj";
38 const int kFileSystemId = 1;
39
40 base::FilePath result =
41 GetMountPointPath(profile_.get(), kExtensionId, kFileSystemId);
42 EXPECT_EQ("/provided/mbflcebpggnecokmikipoihdbecnjfoj-1-testing_profile-hash",
43 result.AsUTF8Unsafe());
44 }
45
46 } // namespace util
47 } // namespace file_system_provider
48 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698