| 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 <stddef.h> |    7 #include <stddef.h> | 
|    8 #include <stdint.h> |    8 #include <stdint.h> | 
|    9  |    9  | 
|   10 #include "base/bind.h" |   10 #include "base/bind.h" | 
|   11 #include "base/files/scoped_temp_dir.h" |   11 #include "base/files/scoped_temp_dir.h" | 
|   12 #include "base/macros.h" |   12 #include "base/macros.h" | 
|   13 #include "base/memory/weak_ptr.h" |   13 #include "base/memory/weak_ptr.h" | 
|   14 #include "base/run_loop.h" |   14 #include "base/run_loop.h" | 
|   15 #include "chrome/browser/browsing_data/browsing_data_quota_helper_impl.h" |   15 #include "chrome/browser/browsing_data/browsing_data_quota_helper_impl.h" | 
|   16 #include "content/public/test/mock_storage_client.h" |  | 
|   17 #include "content/public/test/test_browser_thread.h" |   16 #include "content/public/test/test_browser_thread.h" | 
|   18 #include "content/public/test/test_browser_thread_bundle.h" |   17 #include "content/public/test/test_browser_thread_bundle.h" | 
|   19 #include "storage/browser/quota/quota_manager.h" |   18 #include "storage/browser/quota/quota_manager.h" | 
|   20 #include "storage/browser/quota/quota_manager_proxy.h" |   19 #include "storage/browser/quota/quota_manager_proxy.h" | 
 |   20 #include "storage/browser/test/mock_storage_client.h" | 
|   21  |   21  | 
|   22 using content::BrowserThread; |   22 using content::BrowserThread; | 
|   23 using content::MockOriginData; |   23 using content::MockOriginData; | 
|   24 using content::MockStorageClient; |   24 using content::MockStorageClient; | 
|   25  |   25  | 
|   26 class BrowsingDataQuotaHelperTest : public testing::Test { |   26 class BrowsingDataQuotaHelperTest : public testing::Test { | 
|   27  public: |   27  public: | 
|   28   typedef BrowsingDataQuotaHelper::QuotaInfo QuotaInfo; |   28   typedef BrowsingDataQuotaHelper::QuotaInfo QuotaInfo; | 
|   29   typedef BrowsingDataQuotaHelper::QuotaInfoArray QuotaInfoArray; |   29   typedef BrowsingDataQuotaHelper::QuotaInfoArray QuotaInfoArray; | 
|   30  |   30  | 
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  191   base::RunLoop().RunUntilIdle(); |  191   base::RunLoop().RunUntilIdle(); | 
|  192  |  192  | 
|  193   GetPersistentHostQuota(kHost1); |  193   GetPersistentHostQuota(kHost1); | 
|  194   base::RunLoop().RunUntilIdle(); |  194   base::RunLoop().RunUntilIdle(); | 
|  195   EXPECT_EQ(0, quota()); |  195   EXPECT_EQ(0, quota()); | 
|  196  |  196  | 
|  197   GetPersistentHostQuota(kHost2); |  197   GetPersistentHostQuota(kHost2); | 
|  198   base::RunLoop().RunUntilIdle(); |  198   base::RunLoop().RunUntilIdle(); | 
|  199   EXPECT_EQ(10, quota()); |  199   EXPECT_EQ(10, quota()); | 
|  200 } |  200 } | 
| OLD | NEW |