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

Side by Side Diff: chrome/browser/google_apis/gdata_wapi_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) 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 <algorithm> 5 #include <algorithm>
6 #include <map> 6 #include <map>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 virtual void SetUp() OVERRIDE { 51 virtual void SetUp() OVERRIDE {
52 file_thread_.Start(); 52 file_thread_.Start();
53 io_thread_.StartIOThread(); 53 io_thread_.StartIOThread();
54 profile_.reset(new TestingProfile); 54 profile_.reset(new TestingProfile);
55 55
56 request_context_getter_ = new net::TestURLRequestContextGetter( 56 request_context_getter_ = new net::TestURLRequestContextGetter(
57 content::BrowserThread::GetMessageLoopProxyForThread( 57 content::BrowserThread::GetMessageLoopProxyForThread(
58 content::BrowserThread::IO)); 58 content::BrowserThread::IO));
59 59
60 operation_runner_.reset(new OperationRunner(profile_.get(), 60 operation_runner_.reset(new OperationRunner(profile_.get(),
61 request_context_getter_, 61 request_context_getter_.get(),
62 std::vector<std::string>(), 62 std::vector<std::string>(),
63 kTestUserAgent)); 63 kTestUserAgent));
64 operation_runner_->auth_service()->set_access_token_for_testing( 64 operation_runner_->auth_service()->set_access_token_for_testing(
65 kTestGDataAuthToken); 65 kTestGDataAuthToken);
66 66
67 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 67 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
68 68
69 ASSERT_TRUE(test_server_.InitializeAndWaitUntilReady()); 69 ASSERT_TRUE(test_server_.InitializeAndWaitUntilReady());
70 test_server_.RegisterRequestHandler( 70 test_server_.RegisterRequestHandler(
71 base::Bind(&test_util::HandleDownloadRequest, 71 base::Bind(&test_util::HandleDownloadRequest,
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 EXPECT_EQ(base::Int64ToString(kUploadContent.size()), 1508 EXPECT_EQ(base::Int64ToString(kUploadContent.size()),
1509 http_request_.headers["X-Upload-Content-Length"]); 1509 http_request_.headers["X-Upload-Content-Length"]);
1510 // For updating an existing file, an empty body should be attached (PUT 1510 // For updating an existing file, an empty body should be attached (PUT
1511 // requires a body) 1511 // requires a body)
1512 EXPECT_TRUE(http_request_.has_content); 1512 EXPECT_TRUE(http_request_.has_content);
1513 EXPECT_EQ("", http_request_.content); 1513 EXPECT_EQ("", http_request_.content);
1514 EXPECT_EQ(kWrongETag, http_request_.headers["If-Match"]); 1514 EXPECT_EQ(kWrongETag, http_request_.headers["If-Match"]);
1515 } 1515 }
1516 1516
1517 } // namespace google_apis 1517 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/drive_api_operations_unittest.cc ('k') | chrome/browser/history/history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698