| OLD | NEW | 
|    1 // Copyright 2014 The Chromium Authors. All rights reserved. |    1 // Copyright 2014 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 <stdint.h> |    5 #include <stdint.h> | 
|    6  |    6  | 
|    7 #include <vector> |    7 #include <vector> | 
|    8  |    8  | 
|    9 #include "base/files/scoped_temp_dir.h" |    9 #include "base/files/scoped_temp_dir.h" | 
|   10 #include "base/run_loop.h" |   10 #include "base/run_loop.h" | 
|   11 #include "base/threading/thread_task_runner_handle.h" |   11 #include "base/threading/thread_task_runner_handle.h" | 
|   12 #include "content/public/test/mock_special_storage_policy.h" |  | 
|   13 #include "content/public/test/mock_storage_client.h" |  | 
|   14 #include "net/base/url_util.h" |   12 #include "net/base/url_util.h" | 
|   15 #include "storage/browser/quota/quota_manager.h" |   13 #include "storage/browser/quota/quota_manager.h" | 
|   16 #include "storage/browser/quota/quota_manager_proxy.h" |   14 #include "storage/browser/quota/quota_manager_proxy.h" | 
|   17 #include "storage/browser/quota/storage_monitor.h" |   15 #include "storage/browser/quota/storage_monitor.h" | 
|   18 #include "storage/browser/quota/storage_observer.h" |   16 #include "storage/browser/quota/storage_observer.h" | 
 |   17 #include "storage/browser/test/mock_special_storage_policy.h" | 
 |   18 #include "storage/browser/test/mock_storage_client.h" | 
|   19 #include "testing/gtest/include/gtest/gtest.h" |   19 #include "testing/gtest/include/gtest/gtest.h" | 
|   20  |   20  | 
|   21 using storage::HostStorageObservers; |   21 using storage::HostStorageObservers; | 
|   22 using storage::kQuotaErrorNotSupported; |   22 using storage::kQuotaErrorNotSupported; | 
|   23 using storage::kQuotaStatusOk; |   23 using storage::kQuotaStatusOk; | 
|   24 using storage::kStorageTypePersistent; |   24 using storage::kStorageTypePersistent; | 
|   25 using storage::kStorageTypeTemporary; |   25 using storage::kStorageTypeTemporary; | 
|   26 using storage::QuotaClient; |   26 using storage::QuotaClient; | 
|   27 using storage::QuotaManager; |   27 using storage::QuotaManager; | 
|   28 using storage::QuotaStatusCode; |   28 using storage::QuotaStatusCode; | 
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  694   base::RunLoop().RunUntilIdle(); |  694   base::RunLoop().RunUntilIdle(); | 
|  695  |  695  | 
|  696   // Verify that the observer receives it. |  696   // Verify that the observer receives it. | 
|  697   ASSERT_EQ(1, mock_observer.EventCount()); |  697   ASSERT_EQ(1, mock_observer.EventCount()); | 
|  698   const StorageObserver::Event& event = mock_observer.LastEvent(); |  698   const StorageObserver::Event& event = mock_observer.LastEvent(); | 
|  699   EXPECT_EQ(params.filter, event.filter); |  699   EXPECT_EQ(params.filter, event.filter); | 
|  700   EXPECT_EQ(kTestUsage, event.usage); |  700   EXPECT_EQ(kTestUsage, event.usage); | 
|  701 } |  701 } | 
|  702  |  702  | 
|  703 }  // namespace content |  703 }  // namespace content | 
| OLD | NEW |