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

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

Issue 11359217: Move scoped_temp_dir from base to base/files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/scoped_temp_dir.h"
8 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 11 #include "base/message_loop.h"
11 #include "base/scoped_temp_dir.h"
12 #include "base/time.h" 12 #include "base/time.h"
13 #include "net/base/io_buffer.h" 13 #include "net/base/io_buffer.h"
14 #include "net/http/http_request_headers.h" 14 #include "net/http/http_request_headers.h"
15 #include "net/http/http_response_headers.h" 15 #include "net/http/http_response_headers.h"
16 #include "net/url_request/url_request.h" 16 #include "net/url_request/url_request.h"
17 #include "net/url_request/url_request_context.h" 17 #include "net/url_request/url_request_context.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 #include "webkit/blob/blob_data.h" 19 #include "webkit/blob/blob_data.h"
20 #include "webkit/blob/blob_url_request_job.h" 20 #include "webkit/blob/blob_url_request_job.h"
21 #include "webkit/fileapi/file_system_context.h" 21 #include "webkit/fileapi/file_system_context.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 *expected_result = std::string(kTestData1 + 1, 2); 288 *expected_result = std::string(kTestData1 + 1, 2);
289 *expected_result += std::string(kTestFileData1 + 2, 3); 289 *expected_result += std::string(kTestFileData1 + 2, 3);
290 *expected_result += std::string(kTestFileSystemFileData1 + 3, 4); 290 *expected_result += std::string(kTestFileSystemFileData1 + 3, 4);
291 *expected_result += std::string(kTestData2 + 4, 5); 291 *expected_result += std::string(kTestData2 + 4, 5);
292 *expected_result += std::string(kTestFileData2 + 5, 6); 292 *expected_result += std::string(kTestFileData2 + 5, 6);
293 *expected_result += std::string(kTestFileSystemFileData2 + 6, 7); 293 *expected_result += std::string(kTestFileSystemFileData2 + 6, 7);
294 return blob_data; 294 return blob_data;
295 } 295 }
296 296
297 protected: 297 protected:
298 ScopedTempDir temp_dir_; 298 base::ScopedTempDir temp_dir_;
299 FilePath temp_file1_; 299 FilePath temp_file1_;
300 FilePath temp_file2_; 300 FilePath temp_file2_;
301 base::Time temp_file_modification_time1_; 301 base::Time temp_file_modification_time1_;
302 base::Time temp_file_modification_time2_; 302 base::Time temp_file_modification_time2_;
303 GURL file_system_root_url_; 303 GURL file_system_root_url_;
304 GURL temp_file_system_file1_; 304 GURL temp_file_system_file1_;
305 GURL temp_file_system_file2_; 305 GURL temp_file_system_file2_;
306 base::Time temp_file_system_file_modification_time1_; 306 base::Time temp_file_system_file_modification_time1_;
307 base::Time temp_file_system_file_modification_time2_; 307 base::Time temp_file_system_file_modification_time2_;
308 MessageLoop message_loop_; 308 MessageLoop message_loop_;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 EXPECT_TRUE(request_->response_headers()->GetMimeType(&content_type)); 460 EXPECT_TRUE(request_->response_headers()->GetMimeType(&content_type));
461 EXPECT_STREQ(content_type.c_str(), kTestContentType); 461 EXPECT_STREQ(content_type.c_str(), kTestContentType);
462 void* iter = NULL; 462 void* iter = NULL;
463 std::string content_disposition; 463 std::string content_disposition;
464 EXPECT_TRUE(request_->response_headers()->EnumerateHeader( 464 EXPECT_TRUE(request_->response_headers()->EnumerateHeader(
465 &iter, "Content-Disposition", &content_disposition)); 465 &iter, "Content-Disposition", &content_disposition));
466 EXPECT_STREQ(content_disposition.c_str(), kTestContentDisposition); 466 EXPECT_STREQ(content_disposition.c_str(), kTestContentDisposition);
467 } 467 }
468 468
469 } // namespace webkit_blob 469 } // namespace webkit_blob
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_database_unittest.cc ('k') | webkit/blob/local_file_stream_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698