OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/message_loop/message_loop_proxy.h" | 11 #include "base/message_loop/message_loop_proxy.h" |
12 #include "chrome/browser/browsing_data/browsing_data_quota_helper_impl.h" | 12 #include "chrome/browser/browsing_data/browsing_data_quota_helper_impl.h" |
13 #include "content/public/test/mock_storage_client.h" | 13 #include "content/public/test/mock_storage_client.h" |
14 #include "content/public/test/test_browser_thread.h" | 14 #include "content/public/test/test_browser_thread.h" |
15 #include "content/public/test/test_browser_thread_bundle.h" | 15 #include "content/public/test/test_browser_thread_bundle.h" |
16 #include "webkit/browser/quota/quota_manager.h" | 16 #include "storage/browser/quota/quota_manager.h" |
17 #include "webkit/browser/quota/quota_manager_proxy.h" | 17 #include "storage/browser/quota/quota_manager_proxy.h" |
18 | 18 |
19 using content::BrowserThread; | 19 using content::BrowserThread; |
20 using content::MockOriginData; | 20 using content::MockOriginData; |
21 using content::MockStorageClient; | 21 using content::MockStorageClient; |
22 | 22 |
23 class BrowsingDataQuotaHelperTest : public testing::Test { | 23 class BrowsingDataQuotaHelperTest : public testing::Test { |
24 public: | 24 public: |
25 typedef BrowsingDataQuotaHelper::QuotaInfo QuotaInfo; | 25 typedef BrowsingDataQuotaHelper::QuotaInfo QuotaInfo; |
26 typedef BrowsingDataQuotaHelper::QuotaInfoArray QuotaInfoArray; | 26 typedef BrowsingDataQuotaHelper::QuotaInfoArray QuotaInfoArray; |
27 | 27 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 base::MessageLoop::current()->RunUntilIdle(); | 197 base::MessageLoop::current()->RunUntilIdle(); |
198 | 198 |
199 GetPersistentHostQuota(kHost1); | 199 GetPersistentHostQuota(kHost1); |
200 base::MessageLoop::current()->RunUntilIdle(); | 200 base::MessageLoop::current()->RunUntilIdle(); |
201 EXPECT_EQ(0, quota()); | 201 EXPECT_EQ(0, quota()); |
202 | 202 |
203 GetPersistentHostQuota(kHost2); | 203 GetPersistentHostQuota(kHost2); |
204 base::MessageLoop::current()->RunUntilIdle(); | 204 base::MessageLoop::current()->RunUntilIdle(); |
205 EXPECT_EQ(10, quota()); | 205 EXPECT_EQ(10, quota()); |
206 } | 206 } |
OLD | NEW |