| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 143 |
| 144 io_thread_.reset(new base::Thread("BlobRLRequestJobTest Thread")); | 144 io_thread_.reset(new base::Thread("BlobRLRequestJobTest Thread")); |
| 145 base::Thread::Options options(MessageLoop::TYPE_IO, 0); | 145 base::Thread::Options options(MessageLoop::TYPE_IO, 0); |
| 146 io_thread_->StartWithOptions(options); | 146 io_thread_->StartWithOptions(options); |
| 147 } | 147 } |
| 148 | 148 |
| 149 void TearDown() { | 149 void TearDown() { |
| 150 io_thread_.reset(NULL); | 150 io_thread_.reset(NULL); |
| 151 } | 151 } |
| 152 | 152 |
| 153 static URLRequestJob* BlobURLRequestJobFactory(net::URLRequest* request, | 153 static net::URLRequestJob* BlobURLRequestJobFactory( |
| 154 const std::string& scheme) { | 154 net::URLRequest* request, |
| 155 const std::string& scheme) { |
| 155 BlobURLRequestJob* temp = blob_url_request_job_; | 156 BlobURLRequestJob* temp = blob_url_request_job_; |
| 156 blob_url_request_job_ = NULL; | 157 blob_url_request_job_ = NULL; |
| 157 return temp; | 158 return temp; |
| 158 } | 159 } |
| 159 | 160 |
| 160 BlobURLRequestJobTest() | 161 BlobURLRequestJobTest() |
| 161 : expected_status_code_(0) { | 162 : expected_status_code_(0) { |
| 162 } | 163 } |
| 163 | 164 |
| 164 template <class Method> | 165 template <class Method> |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 | 440 |
| 440 TEST_F(BlobURLRequestJobTest, TestExtraHeaders) { | 441 TEST_F(BlobURLRequestJobTest, TestExtraHeaders) { |
| 441 RunTestOnIOThread(&BlobURLRequestJobTest::TestExtraHeaders); | 442 RunTestOnIOThread(&BlobURLRequestJobTest::TestExtraHeaders); |
| 442 } | 443 } |
| 443 | 444 |
| 444 } // namespace webkit_blob | 445 } // namespace webkit_blob |
| 445 | 446 |
| 446 // BlobURLRequestJobTest is expected to always live longer than the | 447 // BlobURLRequestJobTest is expected to always live longer than the |
| 447 // runnable methods. This lets us call NewRunnableMethod on its instances. | 448 // runnable methods. This lets us call NewRunnableMethod on its instances. |
| 448 DISABLE_RUNNABLE_METHOD_REFCOUNT(webkit_blob::BlobURLRequestJobTest); | 449 DISABLE_RUNNABLE_METHOD_REFCOUNT(webkit_blob::BlobURLRequestJobTest); |
| OLD | NEW |