OLD | NEW |
---|---|
(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/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 FileSystemProviderUtilTest : public testing::Test { | |
19 protected: | |
20 FileSystemProviderUtilTest() {} | |
21 virtual ~FileSystemProviderUtilTest() {} | |
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(FileSystemProviderUtilTest, GetMountPointPath) { | |
37 base::FilePath result = | |
38 GetMountPointPath(profile_.get(), "mbflcebpggnecokmikipoihdbecnjfoj", 1); | |
hashimoto
2014/04/09 06:18:23
Please make the string "mbflce..." constant to mak
mtomasz
2014/04/09 19:51:15
Done.
| |
39 EXPECT_EQ("/provided/mbflcebpggnecokmikipoihdbecnjfoj-1-testing_profile-hash", | |
40 result.AsUTF8Unsafe()); | |
41 } | |
42 | |
43 } // namespace util | |
44 } // namespace file_system_provider | |
45 } // namespace chromeos | |
OLD | NEW |