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

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

Issue 11416382: ********** Content tests with blob hacking. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « content/content_tests.gypi ('k') | webkit/blob/mock_blob_url_request_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 test_->file_system_context_, 129 test_->file_system_context_,
130 base::MessageLoopProxy::current()); 130 base::MessageLoopProxy::current());
131 } 131 }
132 132
133 private: 133 private:
134 BlobURLRequestJobTest* test_; 134 BlobURLRequestJobTest* test_;
135 }; 135 };
136 136
137 BlobURLRequestJobTest() 137 BlobURLRequestJobTest()
138 : message_loop_(MessageLoop::TYPE_IO), 138 : message_loop_(MessageLoop::TYPE_IO),
139 blob_data_(new BlobData()), 139 blob_data_(new BlobData("id")),
140 expected_status_code_(0) { 140 expected_status_code_(0) {
141 } 141 }
142 142
143 virtual void SetUp() { 143 virtual void SetUp() {
144 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 144 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
145 145
146 temp_file1_ = temp_dir_.path().AppendASCII("BlobFile1.dat"); 146 temp_file1_ = temp_dir_.path().AppendASCII("BlobFile1.dat");
147 ASSERT_EQ(static_cast<int>(arraysize(kTestFileData1) - 1), 147 ASSERT_EQ(static_cast<int>(arraysize(kTestFileData1) - 1),
148 file_util::WriteFile(temp_file1_, kTestFileData1, 148 file_util::WriteFile(temp_file1_, kTestFileData1,
149 arraysize(kTestFileData1) - 1)); 149 arraysize(kTestFileData1) - 1));
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 EXPECT_TRUE(request_->response_headers()->GetMimeType(&content_type)); 450 EXPECT_TRUE(request_->response_headers()->GetMimeType(&content_type));
451 EXPECT_EQ(kTestContentType, content_type); 451 EXPECT_EQ(kTestContentType, content_type);
452 void* iter = NULL; 452 void* iter = NULL;
453 std::string content_disposition; 453 std::string content_disposition;
454 EXPECT_TRUE(request_->response_headers()->EnumerateHeader( 454 EXPECT_TRUE(request_->response_headers()->EnumerateHeader(
455 &iter, "Content-Disposition", &content_disposition)); 455 &iter, "Content-Disposition", &content_disposition));
456 EXPECT_EQ(kTestContentDisposition, content_disposition); 456 EXPECT_EQ(kTestContentDisposition, content_disposition);
457 } 457 }
458 458
459 } // namespace webkit_blob 459 } // namespace webkit_blob
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | webkit/blob/mock_blob_url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698