OLD | NEW |
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 <iterator> | 5 #include <iterator> |
6 #include <string> | 6 #include <string> |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 ComponentUpdateService* component_updater() { | 125 ComponentUpdateService* component_updater() { |
126 return component_updater_.get(); | 126 return component_updater_.get(); |
127 } | 127 } |
128 scoped_refptr<TestConfigurator> configurator() const { return config_; } | 128 scoped_refptr<TestConfigurator> configurator() const { return config_; } |
129 base::Closure quit_closure() const { return quit_closure_; } | 129 base::Closure quit_closure() const { return quit_closure_; } |
130 | 130 |
131 protected: | 131 protected: |
132 void RunThreads(); | 132 void RunThreads(); |
133 | 133 |
134 private: | 134 private: |
135 static const int kNumWorkerThreads_ = 1; | 135 static const int kNumWorkerThreads_ = 2; |
136 | 136 |
137 base::MessageLoopForUI message_loop_; | 137 base::MessageLoopForUI message_loop_; |
138 base::RunLoop runloop_; | 138 base::RunLoop runloop_; |
139 base::Closure quit_closure_; | 139 base::Closure quit_closure_; |
140 | 140 |
141 std::unique_ptr<base::SequencedWorkerPoolOwner> worker_pool_; | 141 std::unique_ptr<base::SequencedWorkerPoolOwner> worker_pool_; |
142 | 142 |
143 scoped_refptr<TestConfigurator> config_; | 143 scoped_refptr<TestConfigurator> config_; |
144 scoped_refptr<MockUpdateClient> update_client_; | 144 scoped_refptr<MockUpdateClient> update_client_; |
145 std::unique_ptr<ComponentUpdateService> component_updater_; | 145 std::unique_ptr<ComponentUpdateService> component_updater_; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 component.pk_hash); | 226 component.pk_hash); |
227 EXPECT_EQ(base::Version("0.0.0.0"), component.version); | 227 EXPECT_EQ(base::Version("0.0.0.0"), component.version); |
228 EXPECT_TRUE(component.fingerprint.empty()); | 228 EXPECT_TRUE(component.fingerprint.empty()); |
229 EXPECT_STREQ("fake name", component.name.c_str()); | 229 EXPECT_STREQ("fake name", component.name.c_str()); |
230 EXPECT_EQ(expected_attrs, component.installer_attributes); | 230 EXPECT_EQ(expected_attrs, component.installer_attributes); |
231 EXPECT_TRUE(component.requires_network_encryption); | 231 EXPECT_TRUE(component.requires_network_encryption); |
232 EXPECT_TRUE(component.supports_group_policy_enable_component_updates); | 232 EXPECT_TRUE(component.supports_group_policy_enable_component_updates); |
233 } | 233 } |
234 | 234 |
235 } // namespace component_updater | 235 } // namespace component_updater |
OLD | NEW |