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

Unified Diff: update_attempter_unittest.cc

Issue 6594025: AU: Full proxy support (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: fixes for review Created 9 years, 10 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 | « update_attempter_mock.h ('k') | update_check_scheduler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: update_attempter_unittest.cc
diff --git a/update_attempter_unittest.cc b/update_attempter_unittest.cc
index 2f606093d3ada3f1bef1f1dd36f852a253be9eb0..76068fd1ecd3b7f705410e9165d81fe7716671bf 100644
--- a/update_attempter_unittest.cc
+++ b/update_attempter_unittest.cc
@@ -33,13 +33,13 @@ namespace chromeos_update_engine {
// methods.
class UpdateAttempterUnderTest : public UpdateAttempter {
public:
- UpdateAttempterUnderTest()
- : UpdateAttempter(NULL, NULL, &dbus_) {}
- MockDbusGlib dbus_;
+ explicit UpdateAttempterUnderTest(MockDbusGlib* dbus)
+ : UpdateAttempter(NULL, NULL, dbus) {}
};
class UpdateAttempterTest : public ::testing::Test {
protected:
+ UpdateAttempterTest() : attempter_(&dbus_) {}
virtual void SetUp() {
EXPECT_EQ(NULL, attempter_.dbus_service_);
EXPECT_EQ(NULL, attempter_.prefs_);
@@ -60,6 +60,7 @@ class UpdateAttempterTest : public ::testing::Test {
attempter_.prefs_ = &prefs_;
}
+ MockDbusGlib dbus_;
UpdateAttempterUnderTest attempter_;
ActionProcessorMock* processor_;
NiceMock<PrefsMock> prefs_;
@@ -110,7 +111,8 @@ TEST_F(UpdateAttempterTest, RunAsRootConstructWithUpdatedMarkerTest) {
extern const char* kUpdateCompletedMarker;
const FilePath kMarker(kUpdateCompletedMarker);
EXPECT_EQ(0, file_util::WriteFile(kMarker, "", 0));
- UpdateAttempterUnderTest attempter;
+ MockDbusGlib dbus;
+ UpdateAttempterUnderTest attempter(&dbus);
EXPECT_EQ(UPDATE_STATUS_UPDATED_NEED_REBOOT, attempter.status());
EXPECT_TRUE(file_util::Delete(kMarker, false));
}
« no previous file with comments | « update_attempter_mock.h ('k') | update_check_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698