| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/prefs/pref_service.h" | |
| 12 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 13 #include "base/values.h" | 12 #include "base/values.h" |
| 14 #include "chrome/browser/chrome_notification_types.h" | 13 #include "chrome/browser/chrome_notification_types.h" |
| 15 #include "chrome/browser/extensions/extension_system_factory.h" | 14 #include "chrome/browser/extensions/extension_system_factory.h" |
| 16 #include "chrome/browser/extensions/menu_manager.h" | 15 #include "chrome/browser/extensions/menu_manager.h" |
| 17 #include "chrome/browser/extensions/test_extension_prefs.h" | 16 #include "chrome/browser/extensions/test_extension_prefs.h" |
| 18 #include "chrome/browser/extensions/test_extension_system.h" | 17 #include "chrome/browser/extensions/test_extension_system.h" |
| 19 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
| 20 #include "chrome/common/extensions/api/context_menus.h" | 19 #include "chrome/common/extensions/api/context_menus.h" |
| 21 #include "chrome/test/base/testing_profile.h" | 20 #include "chrome/test/base/testing_profile.h" |
| 21 #include "components/prefs/pref_service.h" |
| 22 #include "components/syncable_prefs/pref_service_syncable.h" | 22 #include "components/syncable_prefs/pref_service_syncable.h" |
| 23 #include "content/public/browser/notification_service.h" | 23 #include "content/public/browser/notification_service.h" |
| 24 #include "content/public/common/context_menu_params.h" | 24 #include "content/public/common/context_menu_params.h" |
| 25 #include "content/public/test/test_browser_thread.h" | 25 #include "content/public/test/test_browser_thread.h" |
| 26 #include "extensions/browser/event_router.h" | 26 #include "extensions/browser/event_router.h" |
| 27 #include "extensions/browser/event_router_factory.h" | 27 #include "extensions/browser/event_router_factory.h" |
| 28 #include "extensions/browser/extension_registry.h" | 28 #include "extensions/browser/extension_registry.h" |
| 29 #include "extensions/browser/extension_system.h" | 29 #include "extensions/browser/extension_system.h" |
| 30 #include "extensions/common/extension.h" | 30 #include "extensions/common/extension.h" |
| 31 #include "testing/gmock/include/gmock/gmock.h" | 31 #include "testing/gmock/include/gmock/gmock.h" |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 EXPECT_EQ(4u, manager_.MenuItems(key1)->size()); | 744 EXPECT_EQ(4u, manager_.MenuItems(key1)->size()); |
| 745 EXPECT_EQ(1u, manager_.MenuItems(key2)->size()); | 745 EXPECT_EQ(1u, manager_.MenuItems(key2)->size()); |
| 746 | 746 |
| 747 // Remove all context menu items with incognito true. | 747 // Remove all context menu items with incognito true. |
| 748 manager_.RemoveAllIncognitoContextItems(); | 748 manager_.RemoveAllIncognitoContextItems(); |
| 749 EXPECT_EQ(2u, manager_.MenuItems(key1)->size()); | 749 EXPECT_EQ(2u, manager_.MenuItems(key1)->size()); |
| 750 EXPECT_EQ(1u, manager_.MenuItems(key2)->size()); | 750 EXPECT_EQ(1u, manager_.MenuItems(key2)->size()); |
| 751 } | 751 } |
| 752 | 752 |
| 753 } // namespace extensions | 753 } // namespace extensions |
| OLD | NEW |