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

Side by Side Diff: google_apis/drive/base_requests_unittest.cc

Issue 1184713004: google_apis: Migrate callers of message_loop_proxy() to task_runner() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/drive/base_requests.h" 5 #include "google_apis/drive/base_requests.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 }; 101 };
102 102
103 } // namespace 103 } // namespace
104 104
105 class BaseRequestsTest : public testing::Test { 105 class BaseRequestsTest : public testing::Test {
106 public: 106 public:
107 BaseRequestsTest() : response_code_(net::HTTP_OK) {} 107 BaseRequestsTest() : response_code_(net::HTTP_OK) {}
108 108
109 void SetUp() override { 109 void SetUp() override {
110 request_context_getter_ = new net::TestURLRequestContextGetter( 110 request_context_getter_ = new net::TestURLRequestContextGetter(
111 message_loop_.message_loop_proxy()); 111 message_loop_.task_runner());
112 112
113 sender_.reset(new RequestSender(new DummyAuthService, 113 sender_.reset(new RequestSender(new DummyAuthService,
114 request_context_getter_.get(), 114 request_context_getter_.get(),
115 message_loop_.message_loop_proxy(), 115 message_loop_.task_runner(),
116 std::string() /* custom user agent */)); 116 std::string() /* custom user agent */));
117 117
118 ASSERT_TRUE(test_server_.InitializeAndWaitUntilReady()); 118 ASSERT_TRUE(test_server_.InitializeAndWaitUntilReady());
119 test_server_.RegisterRequestHandler( 119 test_server_.RegisterRequestHandler(
120 base::Bind(&BaseRequestsTest::HandleRequest, base::Unretained(this))); 120 base::Bind(&BaseRequestsTest::HandleRequest, base::Unretained(this)));
121 } 121 }
122 122
123 scoped_ptr<net::test_server::HttpResponse> HandleRequest( 123 scoped_ptr<net::test_server::HttpResponse> HandleRequest(
124 const net::test_server::HttpRequest& request) { 124 const net::test_server::HttpRequest& request) {
125 scoped_ptr<net::test_server::BasicHttpResponse> response( 125 scoped_ptr<net::test_server::BasicHttpResponse> response(
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 "\n" 222 "\n"
223 "This is a sample file. I like chocolate and chips.\n" 223 "This is a sample file. I like chocolate and chips.\n"
224 "\n" 224 "\n"
225 "--TESTBOUNDARY--", 225 "--TESTBOUNDARY--",
226 upload_content_data); 226 upload_content_data);
227 ASSERT_EQ(HTTP_SUCCESS, error); 227 ASSERT_EQ(HTTP_SUCCESS, error);
228 EXPECT_EQ("file_id", file->file_id()); 228 EXPECT_EQ("file_id", file->file_id());
229 } 229 }
230 230
231 } // Namespace google_apis 231 } // Namespace google_apis
OLDNEW
« no previous file with comments | « google_apis/drive/base_requests_server_unittest.cc ('k') | google_apis/drive/drive_api_requests_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698