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

Side by Side Diff: chrome/browser/google_apis/base_operations_server_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 "chrome/browser/google_apis/base_operations.h" 5 #include "chrome/browser/google_apis/base_operations.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 virtual void SetUp() OVERRIDE { 43 virtual void SetUp() OVERRIDE {
44 file_thread_.Start(); 44 file_thread_.Start();
45 io_thread_.StartIOThread(); 45 io_thread_.StartIOThread();
46 profile_.reset(new TestingProfile); 46 profile_.reset(new TestingProfile);
47 47
48 request_context_getter_ = new net::TestURLRequestContextGetter( 48 request_context_getter_ = new net::TestURLRequestContextGetter(
49 content::BrowserThread::GetMessageLoopProxyForThread( 49 content::BrowserThread::GetMessageLoopProxyForThread(
50 content::BrowserThread::IO)); 50 content::BrowserThread::IO));
51 51
52 operation_runner_.reset(new OperationRunner(profile_.get(), 52 operation_runner_.reset(new OperationRunner(profile_.get(),
53 request_context_getter_, 53 request_context_getter_.get(),
54 std::vector<std::string>(), 54 std::vector<std::string>(),
55 kTestUserAgent)); 55 kTestUserAgent));
56 operation_runner_->auth_service()->set_access_token_for_testing( 56 operation_runner_->auth_service()->set_access_token_for_testing(
57 kTestAuthToken); 57 kTestAuthToken);
58 58
59 ASSERT_TRUE(test_server_.InitializeAndWaitUntilReady()); 59 ASSERT_TRUE(test_server_.InitializeAndWaitUntilReady());
60 test_server_.RegisterRequestHandler( 60 test_server_.RegisterRequestHandler(
61 base::Bind(&test_util::HandleDownloadRequest, 61 base::Bind(&test_util::HandleDownloadRequest,
62 test_server_.base_url(), 62 test_server_.base_url(),
63 base::Unretained(&http_request_))); 63 base::Unretained(&http_request_)));
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 file_util::Delete(temp_file, false); 146 file_util::Delete(temp_file, false);
147 147
148 EXPECT_EQ(HTTP_NOT_FOUND, result_code); 148 EXPECT_EQ(HTTP_NOT_FOUND, result_code);
149 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method); 149 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
150 EXPECT_EQ("/files/chromeos/gdata/no-such-file.txt", 150 EXPECT_EQ("/files/chromeos/gdata/no-such-file.txt",
151 http_request_.relative_url); 151 http_request_.relative_url);
152 // Do not verify the not found message. 152 // Do not verify the not found message.
153 } 153 }
154 154
155 } // namespace google_apis 155 } // namespace google_apis
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698