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

Side by Side Diff: content/browser/quota/quota_reservation_manager_unittest.cc

Issue 253753007: Move all remaining fileapi and quota unit tests from webkit/ to content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2013 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 "webkit/browser/fileapi/quota/quota_reservation_manager.h" 5 #include "webkit/browser/fileapi/quota/quota_reservation_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file.h" 10 #include "base/files/file.h"
11 #include "base/files/scoped_temp_dir.h" 11 #include "base/files/scoped_temp_dir.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "webkit/browser/fileapi/quota/open_file_handle.h" 15 #include "webkit/browser/fileapi/quota/open_file_handle.h"
16 #include "webkit/browser/fileapi/quota/quota_reservation.h" 16 #include "webkit/browser/fileapi/quota/quota_reservation.h"
17 17
18 namespace fileapi { 18 namespace fileapi {
jam 2014/04/28 19:31:06 ditto
19 19
20 namespace { 20 namespace {
21 21
22 const char kOrigin[] = "http://example.com"; 22 const char kOrigin[] = "http://example.com";
23 const FileSystemType kType = kFileSystemTypeTemporary; 23 const FileSystemType kType = kFileSystemTypeTemporary;
24 const int64 kInitialFileSize = 1; 24 const int64 kInitialFileSize = 1;
25 25
26 typedef QuotaReservationManager::ReserveQuotaCallback ReserveQuotaCallback; 26 typedef QuotaReservationManager::ReserveQuotaCallback ReserveQuotaCallback;
27 27
28 int64 GetFileSize(const base::FilePath& path) { 28 int64 GetFileSize(const base::FilePath& path) {
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 353
354 EXPECT_EQ(kInitialFileSize + 10, GetFileSize(file_path())); 354 EXPECT_EQ(kInitialFileSize + 10, GetFileSize(file_path()));
355 EXPECT_EQ(kInitialFileSize + 15 + 20, fake_backend()->on_memory_usage()); 355 EXPECT_EQ(kInitialFileSize + 15 + 20, fake_backend()->on_memory_usage());
356 EXPECT_EQ(kInitialFileSize + 10, fake_backend()->on_disk_usage()); 356 EXPECT_EQ(kInitialFileSize + 10, fake_backend()->on_disk_usage());
357 357
358 reservation2 = NULL; 358 reservation2 = NULL;
359 EXPECT_EQ(kInitialFileSize + 10, fake_backend()->on_memory_usage()); 359 EXPECT_EQ(kInitialFileSize + 10, fake_backend()->on_memory_usage());
360 } 360 }
361 361
362 } // namespace fileapi 362 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698