OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/ui/webui/help/version_updater_chromeos.h" | 5 #include "chrome/browser/ui/webui/help/version_updater_chromeos.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 void CheckNotification(VersionUpdater::Status /* status */, | 31 void CheckNotification(VersionUpdater::Status /* status */, |
32 int /* progress */, | 32 int /* progress */, |
33 const base::string16& /* message */) { | 33 const base::string16& /* message */) { |
34 } | 34 } |
35 | 35 |
36 } // namespace | 36 } // namespace |
37 | 37 |
38 class VersionUpdaterCrosTest : public ::testing::Test { | 38 class VersionUpdaterCrosTest : public ::testing::Test { |
39 protected: | 39 protected: |
40 VersionUpdaterCrosTest() | 40 VersionUpdaterCrosTest() |
41 : version_updater_(VersionUpdater::Create()), | 41 : version_updater_(VersionUpdater::Create(nullptr)), |
42 fake_update_engine_client_(NULL), | 42 fake_update_engine_client_(NULL), |
43 mock_user_manager_(new MockUserManager()), | 43 mock_user_manager_(new MockUserManager()), |
44 user_manager_enabler_(mock_user_manager_) {} | 44 user_manager_enabler_(mock_user_manager_) {} |
45 | 45 |
46 virtual ~VersionUpdaterCrosTest() {} | 46 virtual ~VersionUpdaterCrosTest() {} |
47 | 47 |
48 virtual void SetUp() override { | 48 virtual void SetUp() override { |
49 fake_update_engine_client_ = new FakeUpdateEngineClient(); | 49 fake_update_engine_client_ = new FakeUpdateEngineClient(); |
50 scoped_ptr<DBusThreadManagerSetter> dbus_setter = | 50 scoped_ptr<DBusThreadManagerSetter> dbus_setter = |
51 DBusThreadManager::GetSetterForTesting(); | 51 DBusThreadManager::GetSetterForTesting(); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 UpdateEngineClient::Status status; | 142 UpdateEngineClient::Status status; |
143 status.status = UpdateEngineClient::UPDATE_STATUS_IDLE; | 143 status.status = UpdateEngineClient::UPDATE_STATUS_IDLE; |
144 fake_update_engine_client_->set_default_status(status); | 144 fake_update_engine_client_->set_default_status(status); |
145 fake_update_engine_client_->NotifyObserversThatStatusChanged(status); | 145 fake_update_engine_client_->NotifyObserversThatStatusChanged(status); |
146 } | 146 } |
147 | 147 |
148 EXPECT_EQ(2, fake_update_engine_client_->request_update_check_call_count()); | 148 EXPECT_EQ(2, fake_update_engine_client_->request_update_check_call_count()); |
149 } | 149 } |
150 | 150 |
151 } // namespace chromeos | 151 } // namespace chromeos |
OLD | NEW |