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

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

Issue 15442002: Move FileAPI sandboxed filesystem related code from webkit/fileapi to webkit/browser/fileapi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 7 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 | « webkit/fileapi/file_system_context.cc ('k') | webkit/fileapi/file_system_quota_client.cc » ('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 "webkit/fileapi/file_system_file_stream_reader.h" 5 #include "webkit/fileapi/file_system_file_stream_reader.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/platform_file.h" 13 #include "base/platform_file.h"
14 #include "net/base/io_buffer.h" 14 #include "net/base/io_buffer.h"
15 #include "net/base/net_errors.h" 15 #include "net/base/net_errors.h"
16 #include "net/base/test_completion_callback.h" 16 #include "net/base/test_completion_callback.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 #include "webkit/browser/fileapi/sandbox_mount_point_provider.h"
18 #include "webkit/fileapi/external_mount_points.h" 19 #include "webkit/fileapi/external_mount_points.h"
19 #include "webkit/fileapi/file_system_context.h" 20 #include "webkit/fileapi/file_system_context.h"
20 #include "webkit/fileapi/file_system_file_util.h" 21 #include "webkit/fileapi/file_system_file_util.h"
21 #include "webkit/fileapi/file_system_operation_context.h" 22 #include "webkit/fileapi/file_system_operation_context.h"
22 #include "webkit/fileapi/mock_file_system_context.h" 23 #include "webkit/fileapi/mock_file_system_context.h"
23 #include "webkit/fileapi/sandbox_mount_point_provider.h"
24 24
25 namespace fileapi { 25 namespace fileapi {
26 26
27 namespace { 27 namespace {
28 28
29 const char kURLOrigin[] = "http://remote/"; 29 const char kURLOrigin[] = "http://remote/";
30 const char kTestFileName[] = "test.dat"; 30 const char kTestFileName[] = "test.dat";
31 const char kTestData[] = "0123456789"; 31 const char kTestData[] = "0123456789";
32 const int kTestDataSize = arraysize(kTestData) - 1; 32 const int kTestDataSize = arraysize(kTestData) - 1;
33 33
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 new net::IOBufferWithSize(kTestDataSize)); 272 new net::IOBufferWithSize(kTestDataSize));
273 int rv = reader->Read(buf, buf->size(), base::Bind(&NeverCalled)); 273 int rv = reader->Read(buf, buf->size(), base::Bind(&NeverCalled));
274 ASSERT_TRUE(rv == net::ERR_IO_PENDING || rv >= 0); 274 ASSERT_TRUE(rv == net::ERR_IO_PENDING || rv >= 0);
275 275
276 // Delete immediately. 276 // Delete immediately.
277 // Should not crash; nor should NeverCalled be callback. 277 // Should not crash; nor should NeverCalled be callback.
278 reader.reset(); 278 reader.reset();
279 } 279 }
280 280
281 } // namespace fileapi 281 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_context.cc ('k') | webkit/fileapi/file_system_quota_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698