Index: chrome/browser/chromeos/file_system_provider/util_unittest.cc |
diff --git a/chrome/browser/chromeos/file_system_provider/util_unittest.cc b/chrome/browser/chromeos/file_system_provider/util_unittest.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8fca3542aef7774c34ec92117d9bbcdf81a2f5f8 |
--- /dev/null |
+++ b/chrome/browser/chromeos/file_system_provider/util_unittest.cc |
@@ -0,0 +1,45 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include <string> |
+ |
+#include "base/files/file.h" |
+#include "chrome/browser/chromeos/file_system_provider/util.h" |
+#include "chrome/browser/chromeos/login/fake_user_manager.h" |
+#include "chrome/test/base/testing_profile.h" |
+#include "content/public/test/test_browser_thread_bundle.h" |
+#include "testing/gtest/include/gtest/gtest.h" |
+ |
+namespace chromeos { |
+namespace file_system_provider { |
+namespace util { |
+ |
+class FileSystemProviderUtilTest : public testing::Test { |
+ protected: |
+ FileSystemProviderUtilTest() {} |
+ virtual ~FileSystemProviderUtilTest() {} |
+ |
+ virtual void SetUp() OVERRIDE { |
+ user_manager_ = new FakeUserManager(); |
+ user_manager_enabler_.reset(new ScopedUserManagerEnabler(user_manager_)); |
+ profile_.reset(new TestingProfile); |
+ user_manager_->AddUser(profile_->GetProfileName()); |
+ } |
+ |
+ content::TestBrowserThreadBundle thread_bundle_; |
+ scoped_ptr<TestingProfile> profile_; |
+ scoped_ptr<ScopedUserManagerEnabler> user_manager_enabler_; |
+ FakeUserManager* user_manager_; |
+}; |
+ |
+TEST_F(FileSystemProviderUtilTest, GetMountPointPath) { |
+ base::FilePath result = |
+ 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.
|
+ EXPECT_EQ("/provided/mbflcebpggnecokmikipoihdbecnjfoj-1-testing_profile-hash", |
+ result.AsUTF8Unsafe()); |
+} |
+ |
+} // namespace util |
+} // namespace file_system_provider |
+} // namespace chromeos |