| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // attribute set. | 239 // attribute set. |
| 240 EXPECT_TRUE(RemoveQuarantineAttribute(dummy_folder_path)); | 240 EXPECT_TRUE(RemoveQuarantineAttribute(dummy_folder_path)); |
| 241 EXPECT_TRUE(RemoveQuarantineAttribute(dummy_folder_path)); | 241 EXPECT_TRUE(RemoveQuarantineAttribute(dummy_folder_path)); |
| 242 EXPECT_EQ(ENOATTR, errno); | 242 EXPECT_EQ(ENOATTR, errno); |
| 243 } | 243 } |
| 244 | 244 |
| 245 TEST_F(MacUtilTest, TestRemoveQuarantineAttributeNonExistentPath) { | 245 TEST_F(MacUtilTest, TestRemoveQuarantineAttributeNonExistentPath) { |
| 246 ScopedTempDir temp_dir_; | 246 ScopedTempDir temp_dir_; |
| 247 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 247 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 248 FilePath non_existent_path = temp_dir_.path().Append("DummyPath"); | 248 FilePath non_existent_path = temp_dir_.path().Append("DummyPath"); |
| 249 ASSERT_FALSE(file_util::PathExists(non_existent_path)); | 249 ASSERT_FALSE(PathExists(non_existent_path)); |
| 250 EXPECT_FALSE(RemoveQuarantineAttribute(non_existent_path)); | 250 EXPECT_FALSE(RemoveQuarantineAttribute(non_existent_path)); |
| 251 } | 251 } |
| 252 | 252 |
| 253 } // namespace | 253 } // namespace |
| 254 | 254 |
| 255 } // namespace mac | 255 } // namespace mac |
| 256 } // namespace base | 256 } // namespace base |
| OLD | NEW |