OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "google_apis/gcm/engine/connection_factory_impl.h" | 5 #include "google_apis/gcm/engine/connection_factory_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "base/test/simple_test_tick_clock.h" | 13 #include "base/test/simple_test_tick_clock.h" |
| 14 #include "base/threading/thread_task_runner_handle.h" |
14 #include "google_apis/gcm/base/mcs_util.h" | 15 #include "google_apis/gcm/base/mcs_util.h" |
15 #include "google_apis/gcm/engine/fake_connection_handler.h" | 16 #include "google_apis/gcm/engine/fake_connection_handler.h" |
16 #include "google_apis/gcm/monitoring/fake_gcm_stats_recorder.h" | 17 #include "google_apis/gcm/monitoring/fake_gcm_stats_recorder.h" |
17 #include "net/base/backoff_entry.h" | 18 #include "net/base/backoff_entry.h" |
18 #include "net/http/http_network_session.h" | 19 #include "net/http/http_network_session.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
20 | 21 |
21 class Policy; | 22 class Policy; |
22 | 23 |
23 namespace gcm { | 24 namespace gcm { |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 WaitForConnections(); | 624 WaitForConnections(); |
624 EXPECT_TRUE(factory()->IsEndpointReachable()); | 625 EXPECT_TRUE(factory()->IsEndpointReachable()); |
625 EXPECT_TRUE(connected_server().is_valid()); | 626 EXPECT_TRUE(connected_server().is_valid()); |
626 | 627 |
627 // Old client events should have been reset after the successful connection. | 628 // Old client events should have been reset after the successful connection. |
628 const auto new_client_events = GetClientEvents(); | 629 const auto new_client_events = GetClientEvents(); |
629 ASSERT_EQ(0, new_client_events.size()); | 630 ASSERT_EQ(0, new_client_events.size()); |
630 } | 631 } |
631 | 632 |
632 } // namespace gcm | 633 } // namespace gcm |
OLD | NEW |