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/component_updater/component_updater_ping_manager.h" |
10 #include "components/component_updater/crx_update_item.h" | 10 #include "components/component_updater/crx_update_item.h" |
11 #include "components/component_updater/test/test_configurator.h" | 11 #include "components/component_updater/test/test_configurator.h" |
12 #include "components/component_updater/test/url_request_post_interceptor.h" | 12 #include "components/component_updater/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; |
| 17 |
16 namespace component_updater { | 18 namespace component_updater { |
17 | 19 |
18 class ComponentUpdaterPingManagerTest : public testing::Test { | 20 class ComponentUpdaterPingManagerTest : public testing::Test { |
19 public: | 21 public: |
20 ComponentUpdaterPingManagerTest(); | 22 ComponentUpdaterPingManagerTest(); |
21 ~ComponentUpdaterPingManagerTest() override {} | 23 ~ComponentUpdaterPingManagerTest() override {} |
22 | 24 |
23 void RunThreadsUntilIdle(); | 25 void RunThreadsUntilIdle(); |
24 | 26 |
25 // Overrides from testing::Test. | 27 // Overrides from testing::Test. |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 "errorcode=\"-1\" url=\"http://host1/path1\" downloaded=\"123\" " | 168 "errorcode=\"-1\" url=\"http://host1/path1\" downloaded=\"123\" " |
167 "total=\"456\" download_time_ms=\"987\"/>" | 169 "total=\"456\" download_time_ms=\"987\"/>" |
168 "<event eventtype=\"14\" eventresult=\"1\" downloader=\"bits\" " | 170 "<event eventtype=\"14\" eventresult=\"1\" downloader=\"bits\" " |
169 "url=\"http://host2/path2\" downloaded=\"1230\" total=\"4560\" " | 171 "url=\"http://host2/path2\" downloaded=\"1230\" total=\"4560\" " |
170 "download_time_ms=\"9870\"/></app>")) | 172 "download_time_ms=\"9870\"/></app>")) |
171 << interceptor->GetRequestsAsString(); | 173 << interceptor->GetRequestsAsString(); |
172 interceptor->Reset(); | 174 interceptor->Reset(); |
173 } | 175 } |
174 | 176 |
175 } // namespace component_updater | 177 } // namespace component_updater |
OLD | NEW |