Index: chrome/browser/extensions/extension_path_util_unittest.cc |
diff --git a/chrome/browser/extensions/extension_path_util_unittest.cc b/chrome/browser/extensions/extension_path_util_unittest.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fa07a8017deaeb7033a9862b13e2d7bcd7c73748 |
--- /dev/null |
+++ b/chrome/browser/extensions/extension_path_util_unittest.cc |
@@ -0,0 +1,39 @@ |
+// 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 "chrome/browser/extensions/path_util.h" |
+ |
+#include "base/file_util.h" |
+#include "base/files/file_path.h" |
+#include "chrome/test/base/testing_profile.h" |
Devlin
2014/08/05 23:40:35
??
gpdavis
2014/08/06 18:37:25
Oops-- I migrated the includes from another file,
|
+#include "testing/gtest/include/gtest/gtest.h" |
+ |
+using base::FilePath; |
+ |
+namespace extensions { |
+ |
+// Basic unittests for path_util::PrettifyPath. |
+// For legacy reasons, it's tested more in: |
Devlin
2014/08/05 23:40:35
nit: remove the colon and the indentation.
gpdavis
2014/08/06 18:37:25
Done.
|
+// FileSystemApiTest.FileSystemApiGetDisplayPathPrettify |
+class ExtensionPathUtilTest : public testing::Test { |
Devlin
2014/08/05 23:40:35
This doesn't do anything. Just do TEST(ExtensionP
gpdavis
2014/08/06 18:37:26
Done.
|
+}; |
+ |
+namespace { |
Devlin
2014/08/05 23:40:35
We don't need to put these tests in their own name
gpdavis
2014/08/06 18:37:26
Done.
|
+ |
+TEST_F(ExtensionPathUtilTest, EmptyPath) { |
+ FilePath empty_path; |
+ FilePath prettified = path_util::PrettifyPath(empty_path); |
+ |
+ ASSERT_TRUE(prettified.empty()); |
+} |
+ |
+TEST_F(ExtensionPathUtilTest, HomeDirectory) { |
Devlin
2014/08/05 23:40:35
Rename this to be "BasicPrettifyPathTest" or somet
gpdavis
2014/08/06 18:37:26
Done.
|
+ FilePath home = base::GetHomeDir(); |
+ FilePath prettified = path_util::PrettifyPath(home.AppendASCII("foo")); |
+ ASSERT_EQ(FilePath(FILE_PATH_LITERAL("~")).AppendASCII("foo"), prettified); |
Devlin
2014/08/05 23:40:35
This is a little condensed for readability in a te
gpdavis
2014/08/06 18:37:25
Done.
|
+} |
+ |
+} // namespace |
+ |
+} // namespace extensions |