OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | |
8 | |
9 #include "base/file_util.h" | 7 #include "base/file_util.h" |
10 #include "base/memory/scoped_callback_factory.h" | 8 #include "base/memory/scoped_callback_factory.h" |
11 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/scoped_temp_dir.h" | 10 #include "base/memory/scoped_temp_dir.h" |
13 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
14 #include "base/message_loop_proxy.h" | 12 #include "base/message_loop_proxy.h" |
15 #include "base/stl_util-inl.h" | 13 #include "base/stl_util-inl.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaError. h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaError. h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaType.h " | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaType.h " |
18 #include "webkit/quota/mock_storage_client.h" | 17 #include "webkit/quota/mock_storage_client.h" |
19 #include "webkit/quota/quota_database.h" | 18 #include "webkit/quota/quota_database.h" |
20 #include "webkit/quota/quota_manager.h" | 19 #include "webkit/quota/quota_manager.h" |
21 | 20 |
22 using base::MessageLoopProxy; | 21 using base::MessageLoopProxy; |
23 using WebKit::WebStorageQuotaError; | 22 using WebKit::WebStorageQuotaError; |
24 using WebKit::WebStorageQuotaType; | 23 using WebKit::WebStorageQuotaType; |
25 | 24 |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
658 GetHostUsage("buz.com", kStorageTypeTemporary); | 657 GetHostUsage("buz.com", kStorageTypeTemporary); |
659 MessageLoop::current()->RunAllPending(); | 658 MessageLoop::current()->RunAllPending(); |
660 EXPECT_EQ(usage(), 4000 + 50000); | 659 EXPECT_EQ(usage(), 4000 + 50000); |
661 | 660 |
662 client->ModifyMockOriginDataSize( | 661 client->ModifyMockOriginDataSize( |
663 GURL("http://buz.com/"), kStorageTypeTemporary, 900000000); | 662 GURL("http://buz.com/"), kStorageTypeTemporary, 900000000); |
664 | 663 |
665 GetHostUsage("buz.com", kStorageTypeTemporary); | 664 GetHostUsage("buz.com", kStorageTypeTemporary); |
666 MessageLoop::current()->RunAllPending(); | 665 MessageLoop::current()->RunAllPending(); |
667 EXPECT_EQ(usage(), 4000 + 50000 + 900000000); | 666 EXPECT_EQ(usage(), 4000 + 50000 + 900000000); |
668 } | 667 } |
kinuko
2011/05/16 06:18:53
Can we add one more test with delete origin? (The
tzik (google)
2011/05/16 07:47:01
Done.
| |
669 | 668 |
670 } // namespace quota | 669 } // namespace quota |
OLD | NEW |