OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "base/version.h" | 8 #include "base/version.h" |
9 #include "components/component_updater/component_updater_ping_manager.h" | 9 #include "components/update_client/crx_update_item.h" |
10 #include "components/component_updater/crx_update_item.h" | 10 #include "components/update_client/ping_manager.h" |
11 #include "components/component_updater/test/test_configurator.h" | 11 #include "components/update_client/test/test_configurator.h" |
12 #include "components/component_updater/test/url_request_post_interceptor.h" | 12 #include "components/update_client/test/url_request_post_interceptor.h" |
13 #include "net/url_request/url_request_test_util.h" | 13 #include "net/url_request/url_request_test_util.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 using std::string; | 16 using std::string; |
17 | 17 |
18 namespace component_updater { | 18 namespace update_client { |
19 | 19 |
20 class ComponentUpdaterPingManagerTest : public testing::Test { | 20 class ComponentUpdaterPingManagerTest : public testing::Test { |
21 public: | 21 public: |
22 ComponentUpdaterPingManagerTest(); | 22 ComponentUpdaterPingManagerTest(); |
23 ~ComponentUpdaterPingManagerTest() override {} | 23 ~ComponentUpdaterPingManagerTest() override {} |
24 | 24 |
25 void RunThreadsUntilIdle(); | 25 void RunThreadsUntilIdle(); |
26 | 26 |
27 // Overrides from testing::Test. | 27 // Overrides from testing::Test. |
28 void SetUp() override; | 28 void SetUp() override; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 "<event eventtype=\"14\" eventresult=\"0\" downloader=\"direct\" " | 167 "<event eventtype=\"14\" eventresult=\"0\" downloader=\"direct\" " |
168 "errorcode=\"-1\" url=\"http://host1/path1\" downloaded=\"123\" " | 168 "errorcode=\"-1\" url=\"http://host1/path1\" downloaded=\"123\" " |
169 "total=\"456\" download_time_ms=\"987\"/>" | 169 "total=\"456\" download_time_ms=\"987\"/>" |
170 "<event eventtype=\"14\" eventresult=\"1\" downloader=\"bits\" " | 170 "<event eventtype=\"14\" eventresult=\"1\" downloader=\"bits\" " |
171 "url=\"http://host2/path2\" downloaded=\"1230\" total=\"4560\" " | 171 "url=\"http://host2/path2\" downloaded=\"1230\" total=\"4560\" " |
172 "download_time_ms=\"9870\"/></app>")) | 172 "download_time_ms=\"9870\"/></app>")) |
173 << interceptor->GetRequestsAsString(); | 173 << interceptor->GetRequestsAsString(); |
174 interceptor->Reset(); | 174 interceptor->Reset(); |
175 } | 175 } |
176 | 176 |
177 } // namespace component_updater | 177 } // namespace update_client |
OLD | NEW |