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

Unified Diff: base/mac/mac_util_unittest.mm

Issue 2275553005: //base: Make ScopedTempDir::path() a GetPath() with a DCHECK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments 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
Index: base/mac/mac_util_unittest.mm
diff --git a/base/mac/mac_util_unittest.mm b/base/mac/mac_util_unittest.mm
index cf567c684cb520528d67ddfcebc34f73dc23b5c9..ec58f002900a4a0b8b5220f7c2fd3759a8e1d8ca 100644
--- a/base/mac/mac_util_unittest.mm
+++ b/base/mac/mac_util_unittest.mm
@@ -108,7 +108,7 @@ TEST_F(MacUtilTest, DISABLED_TestExcludeFileFromBackups) {
// The file must already exist in order to set its exclusion property.
ScopedTempDir temp_dir_;
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
- FilePath dummy_file_path = temp_dir_.path().Append("DummyFile");
+ FilePath dummy_file_path = temp_dir_.GetPath().Append("DummyFile");
const char dummy_data[] = "All your base are belong to us!";
// Dump something real into the file.
ASSERT_EQ(static_cast<int>(arraysize(dummy_data)),
@@ -235,7 +235,7 @@ TEST_F(MacUtilTest, ParseModelIdentifier) {
TEST_F(MacUtilTest, TestRemoveQuarantineAttribute) {
ScopedTempDir temp_dir_;
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
- FilePath dummy_folder_path = temp_dir_.path().Append("DummyFolder");
+ FilePath dummy_folder_path = temp_dir_.GetPath().Append("DummyFolder");
ASSERT_TRUE(base::CreateDirectory(dummy_folder_path));
const char* quarantine_str = "0000;4b392bb2;Chromium;|org.chromium.Chromium";
const char* file_path_str = dummy_folder_path.value().c_str();
@@ -252,7 +252,7 @@ TEST_F(MacUtilTest, TestRemoveQuarantineAttribute) {
TEST_F(MacUtilTest, TestRemoveQuarantineAttributeTwice) {
ScopedTempDir temp_dir_;
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
- FilePath dummy_folder_path = temp_dir_.path().Append("DummyFolder");
+ FilePath dummy_folder_path = temp_dir_.GetPath().Append("DummyFolder");
const char* file_path_str = dummy_folder_path.value().c_str();
ASSERT_TRUE(base::CreateDirectory(dummy_folder_path));
EXPECT_EQ(-1, getxattr(file_path_str, "com.apple.quarantine", NULL, 0, 0, 0));
@@ -267,7 +267,7 @@ TEST_F(MacUtilTest, TestRemoveQuarantineAttributeTwice) {
TEST_F(MacUtilTest, TestRemoveQuarantineAttributeNonExistentPath) {
ScopedTempDir temp_dir_;
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
- FilePath non_existent_path = temp_dir_.path().Append("DummyPath");
+ FilePath non_existent_path = temp_dir_.GetPath().Append("DummyPath");
ASSERT_FALSE(PathExists(non_existent_path));
EXPECT_FALSE(RemoveQuarantineAttribute(non_existent_path));
}
« no previous file with comments | « base/json/json_value_serializer_unittest.cc ('k') | base/metrics/persistent_histogram_allocator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698