| 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 "extensions/browser/lazy_background_task_queue.h" | 5 #include "extensions/browser/lazy_background_task_queue.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" |
| 8 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/prefs/testing_pref_service.h" | 10 #include "base/prefs/testing_pref_service.h" |
| 10 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 11 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 11 #include "components/pref_registry/testing_pref_service_syncable.h" | 12 #include "components/pref_registry/testing_pref_service_syncable.h" |
| 12 #include "components/user_prefs/user_prefs.h" | 13 #include "components/user_prefs/user_prefs.h" |
| 13 #include "content/public/browser/notification_service.h" | 14 #include "content/public/browser/notification_service.h" |
| 14 #include "content/public/test/test_browser_context.h" | 15 #include "content/public/test/test_browser_context.h" |
| 15 #include "extensions/browser/extension_registry.h" | 16 #include "extensions/browser/extension_registry.h" |
| 16 #include "extensions/browser/extension_registry_factory.h" | 17 #include "extensions/browser/extension_registry_factory.h" |
| 17 #include "extensions/browser/extensions_test.h" | 18 #include "extensions/browser/extensions_test.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 EXPECT_EQ(1u, queue.extensions_with_pending_tasks()); | 210 EXPECT_EQ(1u, queue.extensions_with_pending_tasks()); |
| 210 | 211 |
| 211 // Processing tasks when there is one pending runs the task and removes the | 212 // Processing tasks when there is one pending runs the task and removes the |
| 212 // extension from the list of extensions with pending tasks. | 213 // extension from the list of extensions with pending tasks. |
| 213 queue.ProcessPendingTasks(NULL, browser_context(), extension.get()); | 214 queue.ProcessPendingTasks(NULL, browser_context(), extension.get()); |
| 214 EXPECT_EQ(1, task_run_count()); | 215 EXPECT_EQ(1, task_run_count()); |
| 215 EXPECT_EQ(0u, queue.extensions_with_pending_tasks()); | 216 EXPECT_EQ(0u, queue.extensions_with_pending_tasks()); |
| 216 } | 217 } |
| 217 | 218 |
| 218 } // namespace extensions | 219 } // namespace extensions |
| OLD | NEW |