OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <deque> | 5 #include <deque> |
6 #include <limits> | 6 #include <limits> |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/platform_file.h" | 15 #include "base/platform_file.h" |
16 #include "content/renderer/pepper/quota_file_io.h" | 16 #include "content/browser/renderer_host/pepper/quota_file_io.h" |
17 #include "content/test/ppapi_unittest.h" | 17 #include "content/test/ppapi_unittest.h" |
18 | 18 |
19 using base::MessageLoopProxy; | 19 using base::MessageLoopProxy; |
20 using base::PlatformFile; | 20 using base::PlatformFile; |
21 using base::PlatformFileError; | 21 using base::PlatformFileError; |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 namespace { | 25 namespace { |
26 class QuotaMockDelegate : public QuotaFileIO::Delegate { | 26 class QuotaMockDelegate : public QuotaFileIO::Delegate { |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 EXPECT_EQ(base::PLATFORM_FILE_ERROR_NO_SPACE, status().front()); | 417 EXPECT_EQ(base::PLATFORM_FILE_ERROR_NO_SPACE, status().front()); |
418 pop_result(); | 418 pop_result(); |
419 | 419 |
420 EXPECT_EQ(22 - 15, delegate()->available_space()); | 420 EXPECT_EQ(22 - 15, delegate()->available_space()); |
421 EXPECT_EQ(15, GetPlatformFileSize()); | 421 EXPECT_EQ(15, GetPlatformFileSize()); |
422 ReadPlatformFile(&read_buffer); | 422 ReadPlatformFile(&read_buffer); |
423 EXPECT_EQ("123355559012345", read_buffer); | 423 EXPECT_EQ("123355559012345", read_buffer); |
424 } | 424 } |
425 | 425 |
426 } // namespace content | 426 } // namespace content |
OLD | NEW |