Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: remoting/host/gcd_state_updater_unittest.cc

Issue 2661153003: Moving oauth code from host to base to allow code sharing between host and client. (Closed)
Patch Set: Merge branch 'master' into auth_token Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/host/gcd_rest_client_unittest.cc ('k') | remoting/host/oauth_token_getter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/threading/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/base/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;
26 26
27 namespace remoting { 27 namespace remoting {
28 28
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « remoting/host/gcd_rest_client_unittest.cc ('k') | remoting/host/oauth_token_getter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698