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

Side by Side Diff: chrome/installer/util/conditional_work_item_list_unittest.cc

Issue 2321573002: //chrome misc: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Fix Win compilation 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "chrome/installer/util/conditional_work_item_list.h" 5 #include "chrome/installer/util/conditional_work_item_list.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 std::unique_ptr<StrictMockCondition> condition_false(new StrictMockCondition); 116 std::unique_ptr<StrictMockCondition> condition_false(new StrictMockCondition);
117 EXPECT_CALL(*condition_false, ShouldRun()).WillOnce(Return(false)); 117 EXPECT_CALL(*condition_false, ShouldRun()).WillOnce(Return(false));
118 EXPECT_TRUE(Not(condition_false.release()).ShouldRun()); 118 EXPECT_TRUE(Not(condition_false.release()).ShouldRun());
119 } 119 }
120 120
121 TEST(ConditionalWorkItemListTest, ConditionRunIfFileExists) { 121 TEST(ConditionalWorkItemListTest, ConditionRunIfFileExists) {
122 base::ScopedTempDir temp_dir; 122 base::ScopedTempDir temp_dir;
123 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 123 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
124 124
125 EXPECT_TRUE(ConditionRunIfFileExists(temp_dir.path()).ShouldRun()); 125 EXPECT_TRUE(ConditionRunIfFileExists(temp_dir.GetPath()).ShouldRun());
126 EXPECT_FALSE(ConditionRunIfFileExists( 126 EXPECT_FALSE(ConditionRunIfFileExists(
127 temp_dir.path().Append(FILE_PATH_LITERAL("DoesNotExist"))) 127 temp_dir.GetPath().Append(FILE_PATH_LITERAL("DoesNotExist")))
128 .ShouldRun()); 128 .ShouldRun());
129 } 129 }
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_util_unittest.cc ('k') | chrome/installer/util/copy_tree_work_item_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698