OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdint.h> | 5 #include <stdint.h> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/scoped_ptr.h" |
15 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
16 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
17 #include "base/thread_task_runner_handle.h" | 18 #include "base/thread_task_runner_handle.h" |
18 #include "storage/browser/fileapi/quota/open_file_handle.h" | 19 #include "storage/browser/fileapi/quota/open_file_handle.h" |
19 #include "storage/browser/fileapi/quota/quota_reservation.h" | 20 #include "storage/browser/fileapi/quota/quota_reservation.h" |
20 #include "storage/browser/fileapi/quota/quota_reservation_manager.h" | 21 #include "storage/browser/fileapi/quota/quota_reservation_manager.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
22 | 23 |
23 using storage::kFileSystemTypeTemporary; | 24 using storage::kFileSystemTypeTemporary; |
24 using storage::OpenFileHandle; | 25 using storage::OpenFileHandle; |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 | 361 |
361 EXPECT_EQ(kInitialFileSize + 10, GetFileSize(file_path())); | 362 EXPECT_EQ(kInitialFileSize + 10, GetFileSize(file_path())); |
362 EXPECT_EQ(kInitialFileSize + 15 + 20, fake_backend()->on_memory_usage()); | 363 EXPECT_EQ(kInitialFileSize + 15 + 20, fake_backend()->on_memory_usage()); |
363 EXPECT_EQ(kInitialFileSize + 10, fake_backend()->on_disk_usage()); | 364 EXPECT_EQ(kInitialFileSize + 10, fake_backend()->on_disk_usage()); |
364 | 365 |
365 reservation2 = NULL; | 366 reservation2 = NULL; |
366 EXPECT_EQ(kInitialFileSize + 10, fake_backend()->on_memory_usage()); | 367 EXPECT_EQ(kInitialFileSize + 10, fake_backend()->on_memory_usage()); |
367 } | 368 } |
368 | 369 |
369 } // namespace content | 370 } // namespace content |
OLD | NEW |