| 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 "chrome/test/base/testing_browser_process.h" |
| 5 #include "chrome/test/base/testing_profile.h" | 6 #include "chrome/test/base/testing_profile.h" |
| 6 #include "chrome/test/testing_browser_process.h" | |
| 7 #include "content/browser/browser_thread.h" | 7 #include "content/browser/browser_thread.h" |
| 8 #include "content/browser/in_process_webkit/dom_storage_context.h" | 8 #include "content/browser/in_process_webkit/dom_storage_context.h" |
| 9 #include "content/browser/in_process_webkit/webkit_context.h" | 9 #include "content/browser/in_process_webkit/webkit_context.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 class MockDOMStorageContext : public DOMStorageContext { | 12 class MockDOMStorageContext : public DOMStorageContext { |
| 13 public: | 13 public: |
| 14 MockDOMStorageContext(WebKitContext* webkit_context, | 14 MockDOMStorageContext(WebKitContext* webkit_context, |
| 15 quota::SpecialStoragePolicy* special_storage_policy) | 15 quota::SpecialStoragePolicy* special_storage_policy) |
| 16 : DOMStorageContext(webkit_context, special_storage_policy), | 16 : DOMStorageContext(webkit_context, special_storage_policy), |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 EXPECT_EQ(0, mock_context->purge_count()); | 70 EXPECT_EQ(0, mock_context->purge_count()); |
| 71 context->PurgeMemory(); | 71 context->PurgeMemory(); |
| 72 MessageLoop::current()->RunAllPending(); | 72 MessageLoop::current()->RunAllPending(); |
| 73 EXPECT_EQ(1, mock_context->purge_count()); | 73 EXPECT_EQ(1, mock_context->purge_count()); |
| 74 } | 74 } |
| 75 // WebKitContext's destructor posts stuff to the webkit thread. Let | 75 // WebKitContext's destructor posts stuff to the webkit thread. Let |
| 76 // WebKitContext go out of scope here before processing WebKitContext's | 76 // WebKitContext go out of scope here before processing WebKitContext's |
| 77 // clean-up tasks. | 77 // clean-up tasks. |
| 78 MessageLoop::current()->RunAllPending(); | 78 MessageLoop::current()->RunAllPending(); |
| 79 } | 79 } |
| OLD | NEW |