| 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 <set> |     5 #include <set> | 
|     6 #include <sstream> |     6 #include <sstream> | 
|     7 #include <vector> |     7 #include <vector> | 
|     8  |     8  | 
|     9 #include "base/bind.h" |     9 #include "base/bind.h" | 
|    10 #include "base/file_util.h" |    10 #include "base/file_util.h" | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|    69   virtual void TearDown() { |    69   virtual void TearDown() { | 
|    70     // Make sure the quota manager cleans up correctly. |    70     // Make sure the quota manager cleans up correctly. | 
|    71     quota_manager_ = NULL; |    71     quota_manager_ = NULL; | 
|    72     base::MessageLoop::current()->RunUntilIdle(); |    72     base::MessageLoop::current()->RunUntilIdle(); | 
|    73   } |    73   } | 
|    74  |    74  | 
|    75  protected: |    75  protected: | 
|    76   void ResetQuotaManager(bool is_incognito) { |    76   void ResetQuotaManager(bool is_incognito) { | 
|    77     quota_manager_ = new QuotaManager(is_incognito, |    77     quota_manager_ = new QuotaManager(is_incognito, | 
|    78                                       data_dir_.path(), |    78                                       data_dir_.path(), | 
|    79                                       MessageLoopProxy::current(), |    79                                       MessageLoopProxy::current().get(), | 
|    80                                       MessageLoopProxy::current(), |    80                                       MessageLoopProxy::current().get(), | 
|    81                                       mock_special_storage_policy_.get()); |    81                                       mock_special_storage_policy_.get()); | 
|    82     // Don't (automatically) start the eviction for testing. |    82     // Don't (automatically) start the eviction for testing. | 
|    83     quota_manager_->eviction_disabled_ = true; |    83     quota_manager_->eviction_disabled_ = true; | 
|    84     // Don't query the hard disk for remaining capacity. |    84     // Don't query the hard disk for remaining capacity. | 
|    85     quota_manager_->get_disk_space_fn_ = &GetAvailableDiskSpaceForTest; |    85     quota_manager_->get_disk_space_fn_ = &GetAvailableDiskSpaceForTest; | 
|    86     additional_callback_count_ = 0; |    86     additional_callback_count_ = 0; | 
|    87   } |    87   } | 
|    88  |    88  | 
|    89   MockStorageClient* CreateClient( |    89   MockStorageClient* CreateClient( | 
|    90       const MockOriginData* mock_data, |    90       const MockOriginData* mock_data, | 
| (...skipping 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2155   EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota()); |  2155   EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota()); | 
|  2156  |  2156  | 
|  2157   GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp); |  2157   GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp); | 
|  2158   base::MessageLoop::current()->RunUntilIdle(); |  2158   base::MessageLoop::current()->RunUntilIdle(); | 
|  2159   EXPECT_EQ(kQuotaStatusOk, status()); |  2159   EXPECT_EQ(kQuotaStatusOk, status()); | 
|  2160   EXPECT_EQ(10, usage()); |  2160   EXPECT_EQ(10, usage()); | 
|  2161   EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota()); |  2161   EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota()); | 
|  2162 } |  2162 } | 
|  2163  |  2163  | 
|  2164 }  // namespace quota |  2164 }  // namespace quota | 
| OLD | NEW |