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

Unified Diff: extensions/common/extension_resource_unittest.cc

Issue 2314363002: extensions: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Comment addressed Created 4 years, 3 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
« no previous file with comments | « extensions/common/extension_l10n_util_unittest.cc ('k') | extensions/common/file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/extension_resource_unittest.cc
diff --git a/extensions/common/extension_resource_unittest.cc b/extensions/common/extension_resource_unittest.cc
index 097793f8052d2e6a85aa317ae65524db0f5574b7..27bd56c6d670b59fd00d37d42a2a57b469d66f08 100644
--- a/extensions/common/extension_resource_unittest.cc
+++ b/extensions/common/extension_resource_unittest.cc
@@ -52,12 +52,12 @@ TEST(ExtensionResourceTest, ResourcesOutsideOfPath) {
base::ScopedTempDir temp;
ASSERT_TRUE(temp.CreateUniqueTempDir());
- base::FilePath inner_dir = temp.path().AppendASCII("directory");
+ base::FilePath inner_dir = temp.GetPath().AppendASCII("directory");
ASSERT_TRUE(base::CreateDirectory(inner_dir));
base::FilePath sub_dir = inner_dir.AppendASCII("subdir");
ASSERT_TRUE(base::CreateDirectory(sub_dir));
base::FilePath inner_file = inner_dir.AppendASCII("inner");
- base::FilePath outer_file = temp.path().AppendASCII("outer");
+ base::FilePath outer_file = temp.GetPath().AppendASCII("outer");
ASSERT_TRUE(base::WriteFile(outer_file, "X", 1));
ASSERT_TRUE(base::WriteFile(inner_file, "X", 1));
std::string extension_id = crx_file::id_util::GenerateId("test");
@@ -124,13 +124,12 @@ TEST(ExtensionResourceTest, CreateWithAllResourcesOnDisk) {
// Create resource in the extension root.
const char* filename = "res.ico";
- base::FilePath root_resource = temp.path().AppendASCII(filename);
+ base::FilePath root_resource = temp.GetPath().AppendASCII(filename);
std::string data = "some foo";
ASSERT_TRUE(base::WriteFile(root_resource, data.c_str(), data.length()));
// Create l10n resources (for current locale and its parents).
- base::FilePath l10n_path =
- temp.path().Append(kLocaleFolder);
+ base::FilePath l10n_path = temp.GetPath().Append(kLocaleFolder);
ASSERT_TRUE(base::CreateDirectory(l10n_path));
std::vector<std::string> locales;
@@ -147,7 +146,7 @@ TEST(ExtensionResourceTest, CreateWithAllResourcesOnDisk) {
base::FilePath path;
std::string extension_id = crx_file::id_util::GenerateId("test");
- ExtensionResource resource(extension_id, temp.path(),
+ ExtensionResource resource(extension_id, temp.GetPath(),
base::FilePath().AppendASCII(filename));
const base::FilePath& resolved_path = resource.GetFilePath();
@@ -158,7 +157,7 @@ TEST(ExtensionResourceTest, CreateWithAllResourcesOnDisk) {
ASSERT_FALSE(expected_path.empty());
EXPECT_EQ(ToLower(expected_path.value()), ToLower(resolved_path.value()));
- EXPECT_EQ(ToLower(temp.path().value()),
+ EXPECT_EQ(ToLower(temp.GetPath().value()),
ToLower(resource.extension_root().value()));
EXPECT_EQ(ToLower(base::FilePath().AppendASCII(filename).value()),
ToLower(resource.relative_path().value()));
« no previous file with comments | « extensions/common/extension_l10n_util_unittest.cc ('k') | extensions/common/file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698