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

Side by Side Diff: google_apis/drive/drive_api_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) 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 } // namespace 114 } // namespace
115 115
116 class DriveApiRequestsTest : public testing::Test { 116 class DriveApiRequestsTest : public testing::Test {
117 public: 117 public:
118 DriveApiRequestsTest() { 118 DriveApiRequestsTest() {
119 } 119 }
120 120
121 void SetUp() override { 121 void SetUp() override {
122 request_context_getter_ = new net::TestURLRequestContextGetter( 122 request_context_getter_ = new net::TestURLRequestContextGetter(
123 message_loop_.message_loop_proxy()); 123 message_loop_.task_runner());
124 124
125 request_sender_.reset(new RequestSender(new DummyAuthService, 125 request_sender_.reset(new RequestSender(new DummyAuthService,
126 request_context_getter_.get(), 126 request_context_getter_.get(),
127 message_loop_.message_loop_proxy(), 127 message_loop_.task_runner(),
128 kTestUserAgent)); 128 kTestUserAgent));
129 129
130 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 130 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
131 131
132 ASSERT_TRUE(test_server_.InitializeAndWaitUntilReady()); 132 ASSERT_TRUE(test_server_.InitializeAndWaitUntilReady());
133 test_server_.RegisterRequestHandler( 133 test_server_.RegisterRequestHandler(
134 base::Bind(&DriveApiRequestsTest::HandleChildrenDeleteRequest, 134 base::Bind(&DriveApiRequestsTest::HandleChildrenDeleteRequest,
135 base::Unretained(this))); 135 base::Unretained(this)));
136 test_server_.RegisterRequestHandler( 136 test_server_.RegisterRequestHandler(
137 base::Bind(&DriveApiRequestsTest::HandleDataFileRequest, 137 base::Bind(&DriveApiRequestsTest::HandleDataFileRequest,
(...skipping 2141 matching lines...) Expand 10 before | Expand all | Expand 10 after
2279 "Header: value\r\n" 2279 "Header: value\r\n"
2280 "\r\n" 2280 "\r\n"
2281 "BODY\r\n" 2281 "BODY\r\n"
2282 "--BOUNDARY-- \t", 2282 "--BOUNDARY-- \t",
2283 &parts)); 2283 &parts));
2284 ASSERT_EQ(1u, parts.size()); 2284 ASSERT_EQ(1u, parts.size());
2285 EXPECT_EQ(HTTP_SUCCESS, parts[0].code); 2285 EXPECT_EQ(HTTP_SUCCESS, parts[0].code);
2286 EXPECT_EQ("BODY", parts[0].body); 2286 EXPECT_EQ("BODY", parts[0].body);
2287 } 2287 }
2288 } // namespace google_apis 2288 } // namespace google_apis
OLDNEW
« no previous file with comments | « google_apis/drive/base_requests_unittest.cc ('k') | google_apis/gaia/account_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698