| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <list> | 5 #include <list> |
| 6 #include <map> | 6 #include <map> |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/message_loop_proxy.h" | 14 #include "base/message_loop_proxy.h" |
| 15 #include "base/task.h" | |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "webkit/quota/mock_storage_client.h" | 16 #include "webkit/quota/mock_storage_client.h" |
| 18 #include "webkit/quota/quota_manager.h" | 17 #include "webkit/quota/quota_manager.h" |
| 19 #include "webkit/quota/quota_temporary_storage_evictor.h" | 18 #include "webkit/quota/quota_temporary_storage_evictor.h" |
| 20 | 19 |
| 21 namespace quota { | 20 namespace quota { |
| 22 | 21 |
| 23 class QuotaTemporaryStorageEvictorTest; | 22 class QuotaTemporaryStorageEvictorTest; |
| 24 | 23 |
| 25 namespace { | 24 namespace { |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 quota_eviction_handler()->set_available_space(1000000000); | 424 quota_eviction_handler()->set_available_space(1000000000); |
| 426 EXPECT_EQ(3000 + 200 + 500000, quota_eviction_handler()->GetUsage()); | 425 EXPECT_EQ(3000 + 200 + 500000, quota_eviction_handler()->GetUsage()); |
| 427 set_repeated_eviction(false); | 426 set_repeated_eviction(false); |
| 428 temporary_storage_evictor()->Start(); | 427 temporary_storage_evictor()->Start(); |
| 429 MessageLoop::current()->RunAllPending(); | 428 MessageLoop::current()->RunAllPending(); |
| 430 // Nothing should have been evicted. | 429 // Nothing should have been evicted. |
| 431 EXPECT_EQ(3000 + 200 + 500000, quota_eviction_handler()->GetUsage()); | 430 EXPECT_EQ(3000 + 200 + 500000, quota_eviction_handler()->GetUsage()); |
| 432 } | 431 } |
| 433 | 432 |
| 434 } // namespace quota | 433 } // namespace quota |
| OLD | NEW |