OLD | NEW |
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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "net/base/net_util.h" | 7 #include "net/base/net_util.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "webkit/quota/mock_special_storage_policy.h" | 9 #include "webkit/browser/quota/mock_special_storage_policy.h" |
10 #include "webkit/quota/usage_tracker.h" | 10 #include "webkit/browser/quota/usage_tracker.h" |
11 | 11 |
12 namespace quota { | 12 namespace quota { |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 void DidGetGlobalUsage(bool* done, | 16 void DidGetGlobalUsage(bool* done, |
17 int64* usage_out, | 17 int64* usage_out, |
18 int64* unlimited_usage_out, | 18 int64* unlimited_usage_out, |
19 int64 usage, | 19 int64 usage, |
20 int64 unlimited_usage) { | 20 int64 unlimited_usage) { |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 UpdateUsage(origin, 100); | 268 UpdateUsage(origin, 100); |
269 | 269 |
270 GetGlobalUsage(&usage, &unlimited_usage); | 270 GetGlobalUsage(&usage, &unlimited_usage); |
271 GetHostUsage(host, &host_usage); | 271 GetHostUsage(host, &host_usage); |
272 EXPECT_EQ(500, usage); | 272 EXPECT_EQ(500, usage); |
273 EXPECT_EQ(0, unlimited_usage); | 273 EXPECT_EQ(0, unlimited_usage); |
274 EXPECT_EQ(500, host_usage); | 274 EXPECT_EQ(500, host_usage); |
275 } | 275 } |
276 | 276 |
277 } // namespace quota | 277 } // namespace quota |
OLD | NEW |