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

Side by Side Diff: remoting/host/gcd_rest_client_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.h ('k') | remoting/host/gcd_state_updater_unittest.cc » ('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_rest_client.h" 5 #include "remoting/host/gcd_rest_client.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/test/simple_test_clock.h" 9 #include "base/test/simple_test_clock.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "net/url_request/test_url_fetcher_factory.h" 11 #include "net/url_request/test_url_fetcher_factory.h"
12 #include "remoting/host/fake_oauth_token_getter.h" 12 #include "remoting/base/fake_oauth_token_getter.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace remoting { 15 namespace remoting {
16 16
17 class GcdRestClientTest : public testing::Test { 17 class GcdRestClientTest : public testing::Test {
18 public: 18 public:
19 GcdRestClientTest() 19 GcdRestClientTest()
20 : default_token_getter_(OAuthTokenGetter::SUCCESS, 20 : default_token_getter_(OAuthTokenGetter::SUCCESS,
21 "<fake_user_email>", 21 "<fake_user_email>",
22 "<fake_access_token>") {} 22 "<fake_access_token>") {}
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 "\"requestTimeMs\":0.0}", 148 "\"requestTimeMs\":0.0}",
149 fetcher->upload_data()); 149 fetcher->upload_data());
150 EXPECT_EQ("application/json", fetcher->upload_content_type()); 150 EXPECT_EQ("application/json", fetcher->upload_content_type());
151 fetcher->set_response_code(200); 151 fetcher->set_response_code(200);
152 fetcher->delegate()->OnURLFetchComplete(fetcher); 152 fetcher->delegate()->OnURLFetchComplete(fetcher);
153 EXPECT_EQ(1, counter_); 153 EXPECT_EQ(1, counter_);
154 EXPECT_EQ(GcdRestClient::SUCCESS, last_result_); 154 EXPECT_EQ(GcdRestClient::SUCCESS, last_result_);
155 } 155 }
156 156
157 } // namespace remoting 157 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/gcd_rest_client.h ('k') | remoting/host/gcd_state_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698