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

Side by Side Diff: webkit/fileapi/file_system_dir_url_request_job_unittest.cc

Issue 11787028: New FileSystemURL cracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test on Win Created 7 years, 11 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) 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 "webkit/fileapi/file_system_dir_url_request_job.h" 5 #include "webkit/fileapi/file_system_dir_url_request_job.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 void TestRequest(const GURL& url) { 99 void TestRequest(const GURL& url) {
100 TestRequestHelper(url, true); 100 TestRequestHelper(url, true);
101 } 101 }
102 102
103 void TestRequestNoRun(const GURL& url) { 103 void TestRequestNoRun(const GURL& url) {
104 TestRequestHelper(url, false); 104 TestRequestHelper(url, false);
105 } 105 }
106 106
107 FileSystemURL CreateURL(const FilePath& file_path) { 107 FileSystemURL CreateURL(const FilePath& file_path) {
108 return FileSystemURL(GURL("http://remote"), 108 return file_system_context_->CreateCrackedFileSystemURL(
109 fileapi::kFileSystemTypeTemporary, 109 GURL("http://remote"),
110 file_path); 110 fileapi::kFileSystemTypeTemporary,
111 file_path);
111 } 112 }
112 113
113 FileSystemOperationContext* NewOperationContext() { 114 FileSystemOperationContext* NewOperationContext() {
114 FileSystemOperationContext* context(new FileSystemOperationContext( 115 FileSystemOperationContext* context(new FileSystemOperationContext(
115 file_system_context_)); 116 file_system_context_));
116 context->set_allowed_bytes_growth(1024); 117 context->set_allowed_bytes_growth(1024);
117 return context; 118 return context;
118 } 119 }
119 120
120 void CreateDirectory(const base::StringPiece& dir_name) { 121 void CreateDirectory(const base::StringPiece& dir_name) {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 CreateDirectory("foo"); 287 CreateDirectory("foo");
287 TestRequestNoRun(CreateFileSystemURL("foo/")); 288 TestRequestNoRun(CreateFileSystemURL("foo/"));
288 // Run StartAsync() and only StartAsync(). 289 // Run StartAsync() and only StartAsync().
289 MessageLoop::current()->DeleteSoon(FROM_HERE, request_.release()); 290 MessageLoop::current()->DeleteSoon(FROM_HERE, request_.release());
290 MessageLoop::current()->RunUntilIdle(); 291 MessageLoop::current()->RunUntilIdle();
291 // If we get here, success! we didn't crash! 292 // If we get here, success! we didn't crash!
292 } 293 }
293 294
294 } // namespace (anonymous) 295 } // namespace (anonymous)
295 } // namespace fileapi 296 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_dir_url_request_job.cc ('k') | webkit/fileapi/file_system_file_stream_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698