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 "chrome/browser/extensions/path_util.h" | |
6 | |
7 #include "base/file_util.h" | |
8 #include "base/files/file_path.h" | |
9 #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,
| |
10 #include "testing/gtest/include/gtest/gtest.h" | |
11 | |
12 using base::FilePath; | |
13 | |
14 namespace extensions { | |
15 | |
16 // Basic unittests for path_util::PrettifyPath. | |
17 // 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.
| |
18 // FileSystemApiTest.FileSystemApiGetDisplayPathPrettify | |
19 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.
| |
20 }; | |
21 | |
22 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.
| |
23 | |
24 TEST_F(ExtensionPathUtilTest, EmptyPath) { | |
25 FilePath empty_path; | |
26 FilePath prettified = path_util::PrettifyPath(empty_path); | |
27 | |
28 ASSERT_TRUE(prettified.empty()); | |
29 } | |
30 | |
31 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.
| |
32 FilePath home = base::GetHomeDir(); | |
33 FilePath prettified = path_util::PrettifyPath(home.AppendASCII("foo")); | |
34 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.
| |
35 } | |
36 | |
37 } // namespace | |
38 | |
39 } // namespace extensions | |
OLD | NEW |