OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "remoting/host/gcd_state_updater.h" | 5 #include "remoting/host/gcd_state_updater.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/strings/stringize_macros.h" | 12 #include "base/strings/stringize_macros.h" |
13 #include "base/test/simple_test_clock.h" | 13 #include "base/test/simple_test_clock.h" |
14 #include "base/test/test_mock_time_task_runner.h" | 14 #include "base/test/test_mock_time_task_runner.h" |
15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "net/url_request/test_url_fetcher_factory.h" | 16 #include "net/url_request/test_url_fetcher_factory.h" |
17 #include "remoting/base/constants.h" | 17 #include "remoting/base/constants.h" |
18 #include "remoting/host/fake_oauth_token_getter.h" | 18 #include "remoting/host/fake_oauth_token_getter.h" |
19 #include "remoting/host/gcd_rest_client.h" | 19 #include "remoting/host/gcd_rest_client.h" |
20 #include "remoting/signaling/fake_signal_strategy.h" | 20 #include "remoting/signaling/fake_signal_strategy.h" |
21 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 using testing::_; | 24 using testing::_; |
25 using testing::Return; | 25 using testing::Return; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 task_runner_->RunUntilIdle(); | 163 task_runner_->RunUntilIdle(); |
164 net::TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0); | 164 net::TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0); |
165 ASSERT_TRUE(fetcher); | 165 ASSERT_TRUE(fetcher); |
166 fetcher->set_response_code(404); | 166 fetcher->set_response_code(404); |
167 fetcher->delegate()->OnURLFetchComplete(fetcher); | 167 fetcher->delegate()->OnURLFetchComplete(fetcher); |
168 EXPECT_EQ(0, on_success_count_); | 168 EXPECT_EQ(0, on_success_count_); |
169 EXPECT_EQ(1, on_host_id_error_count_); | 169 EXPECT_EQ(1, on_host_id_error_count_); |
170 } | 170 } |
171 | 171 |
172 } // namespace remoting | 172 } // namespace remoting |
OLD | NEW |