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

Unified Diff: chrome/common/extensions/extension_resource_unittest.cc

Issue 343003: Get rid of FilePath::AppendAndResolveRelative().... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/extension_resource_unittest.cc
===================================================================
--- chrome/common/extensions/extension_resource_unittest.cc (revision 30231)
+++ chrome/common/extensions/extension_resource_unittest.cc (working copy)
@@ -35,12 +35,10 @@
relative_path = relative_path.AppendASCII("cira.js");
ExtensionResource resource(root_path, relative_path);
+ // The path doesn't exist on disk, we will be returned an empty path.
EXPECT_EQ(root_path.value(), resource.extension_root().value());
EXPECT_EQ(relative_path.value(), resource.relative_path().value());
- EXPECT_EQ(ToLower(root_path.Append(relative_path).value()),
- ToLower(resource.GetFilePath().value()));
-
- EXPECT_FALSE(resource.GetFilePath().empty());
+ EXPECT_TRUE(resource.GetFilePath().empty());
}
TEST(ExtensionResourceTest, CreateWithAllResourcesOnDisk) {
@@ -76,6 +74,7 @@
ASSERT_FALSE(locales.empty());
FilePath expected_path;
expected_path = l10n_path.AppendASCII(locales[0]).AppendASCII(filename);
+ ASSERT_TRUE(file_util::AbsolutePath(&expected_path));
EXPECT_EQ(ToLower(expected_path.value()), ToLower(resolved_path.value()));
EXPECT_EQ(ToLower(temp.path().value()),

Powered by Google App Engine
This is Rietveld 408576698