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

Side by Side Diff: chrome/browser/google_apis/drive_api_operations_unittest.cc

Issue 16296002: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
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/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 virtual void SetUp() OVERRIDE { 57 virtual void SetUp() OVERRIDE {
58 file_thread_.Start(); 58 file_thread_.Start();
59 io_thread_.StartIOThread(); 59 io_thread_.StartIOThread();
60 profile_.reset(new TestingProfile); 60 profile_.reset(new TestingProfile);
61 61
62 request_context_getter_ = new net::TestURLRequestContextGetter( 62 request_context_getter_ = new net::TestURLRequestContextGetter(
63 content::BrowserThread::GetMessageLoopProxyForThread( 63 content::BrowserThread::GetMessageLoopProxyForThread(
64 content::BrowserThread::IO)); 64 content::BrowserThread::IO));
65 65
66 operation_runner_.reset(new OperationRunner(profile_.get(), 66 operation_runner_.reset(new OperationRunner(profile_.get(),
67 request_context_getter_, 67 request_context_getter_.get(),
68 std::vector<std::string>(), 68 std::vector<std::string>(),
69 kTestUserAgent)); 69 kTestUserAgent));
70 operation_runner_->auth_service()->set_access_token_for_testing( 70 operation_runner_->auth_service()->set_access_token_for_testing(
71 kTestDriveApiAuthToken); 71 kTestDriveApiAuthToken);
72 72
73 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 73 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
74 74
75 ASSERT_TRUE(test_server_.InitializeAndWaitUntilReady()); 75 ASSERT_TRUE(test_server_.InitializeAndWaitUntilReady());
76 test_server_.RegisterRequestHandler( 76 test_server_.RegisterRequestHandler(
77 base::Bind(&DriveApiOperationsTest::HandleChildrenDeleteRequest, 77 base::Bind(&DriveApiOperationsTest::HandleChildrenDeleteRequest,
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 EXPECT_EQ("Conflicting-etag", http_request_.headers["If-Match"]); 1307 EXPECT_EQ("Conflicting-etag", http_request_.headers["If-Match"]);
1308 1308
1309 EXPECT_EQ(net::test_server::METHOD_PUT, http_request_.method); 1309 EXPECT_EQ(net::test_server::METHOD_PUT, http_request_.method);
1310 EXPECT_EQ("/upload/drive/v2/files/resource_id?uploadType=resumable", 1310 EXPECT_EQ("/upload/drive/v2/files/resource_id?uploadType=resumable",
1311 http_request_.relative_url); 1311 http_request_.relative_url);
1312 EXPECT_TRUE(http_request_.has_content); 1312 EXPECT_TRUE(http_request_.has_content);
1313 EXPECT_TRUE(http_request_.content.empty()); 1313 EXPECT_TRUE(http_request_.content.empty());
1314 } 1314 }
1315 1315
1316 } // namespace google_apis 1316 } // namespace google_apis
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698