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

Side by Side Diff: webkit/blob/blob_url_request_job_unittest.cc

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <stack> 5 #include <stack>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 void TestRequest(const std::string& method, 247 void TestRequest(const std::string& method,
248 const net::HttpRequestHeaders& extra_headers, 248 const net::HttpRequestHeaders& extra_headers,
249 BlobData* blob_data) { 249 BlobData* blob_data) {
250 // This test has async steps. 250 // This test has async steps.
251 request_.reset(new net::URLRequest(GURL("blob:blah"), 251 request_.reset(new net::URLRequest(GURL("blob:blah"),
252 url_request_delegate_.get())); 252 url_request_delegate_.get()));
253 request_->set_method(method); 253 request_->set_method(method);
254 blob_url_request_job_ = new BlobURLRequestJob( 254 blob_url_request_job_ = new BlobURLRequestJob(
255 request_.get(), 255 request_.get(),
256 blob_data, 256 blob_data,
257 base::MessageLoopProxy::CreateForCurrentThread()); 257 base::MessageLoopProxy::current());
258 258
259 // Start the request. 259 // Start the request.
260 if (!extra_headers.IsEmpty()) 260 if (!extra_headers.IsEmpty())
261 request_->SetExtraRequestHeaders(extra_headers); 261 request_->SetExtraRequestHeaders(extra_headers);
262 request_->Start(); 262 request_->Start();
263 263
264 // Completion is async. 264 // Completion is async.
265 } 265 }
266 266
267 void VerifyResponse() { 267 void VerifyResponse() {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 462
463 TEST_F(BlobURLRequestJobTest, TestExtraHeaders) { 463 TEST_F(BlobURLRequestJobTest, TestExtraHeaders) {
464 RunTestOnIOThread(&BlobURLRequestJobTest::TestExtraHeaders); 464 RunTestOnIOThread(&BlobURLRequestJobTest::TestExtraHeaders);
465 } 465 }
466 466
467 } // namespace webkit_blob 467 } // namespace webkit_blob
468 468
469 // BlobURLRequestJobTest is expected to always live longer than the 469 // BlobURLRequestJobTest is expected to always live longer than the
470 // runnable methods. This lets us call NewRunnableMethod on its instances. 470 // runnable methods. This lets us call NewRunnableMethod on its instances.
471 DISABLE_RUNNABLE_METHOD_REFCOUNT(webkit_blob::BlobURLRequestJobTest); 471 DISABLE_RUNNABLE_METHOD_REFCOUNT(webkit_blob::BlobURLRequestJobTest);
OLDNEW
« no previous file with comments | « tools/valgrind/drmemory/suppressions.txt ('k') | webkit/blob/deletable_file_reference_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698