| 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/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 8 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 9 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 10 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 11 #include "base/scoped_temp_dir.h" | |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "chrome/browser/extensions/event_names.h" | 14 #include "chrome/browser/extensions/event_names.h" |
| 15 #include "chrome/browser/extensions/event_router.h" | 15 #include "chrome/browser/extensions/event_router.h" |
| 16 #include "chrome/browser/extensions/extension_system_factory.h" | 16 #include "chrome/browser/extensions/extension_system_factory.h" |
| 17 #include "chrome/browser/extensions/menu_manager.h" | 17 #include "chrome/browser/extensions/menu_manager.h" |
| 18 #include "chrome/browser/prefs/pref_service.h" | |
| 19 #include "chrome/browser/extensions/test_extension_prefs.h" | 18 #include "chrome/browser/extensions/test_extension_prefs.h" |
| 20 #include "chrome/browser/extensions/test_extension_system.h" | 19 #include "chrome/browser/extensions/test_extension_system.h" |
| 20 #include "chrome/browser/prefs/pref_service.h" |
| 21 #include "chrome/common/chrome_notification_types.h" | 21 #include "chrome/common/chrome_notification_types.h" |
| 22 #include "chrome/common/chrome_paths.h" | 22 #include "chrome/common/chrome_paths.h" |
| 23 #include "chrome/common/extensions/extension.h" | 23 #include "chrome/common/extensions/extension.h" |
| 24 #include "chrome/common/extensions/extension_constants.h" | 24 #include "chrome/common/extensions/extension_constants.h" |
| 25 #include "chrome/test/base/testing_profile.h" | 25 #include "chrome/test/base/testing_profile.h" |
| 26 #include "content/public/browser/notification_service.h" | 26 #include "content/public/browser/notification_service.h" |
| 27 #include "content/public/common/context_menu_params.h" | 27 #include "content/public/common/context_menu_params.h" |
| 28 #include "content/public/test/test_browser_thread.h" | 28 #include "content/public/test/test_browser_thread.h" |
| 29 #include "testing/gmock/include/gmock/gmock.h" | 29 #include "testing/gmock/include/gmock/gmock.h" |
| 30 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 EXPECT_EQ(4u, manager_.MenuItems(extension1->id())->size()); | 741 EXPECT_EQ(4u, manager_.MenuItems(extension1->id())->size()); |
| 742 EXPECT_EQ(1u, manager_.MenuItems(extension2->id())->size()); | 742 EXPECT_EQ(1u, manager_.MenuItems(extension2->id())->size()); |
| 743 | 743 |
| 744 // Remove all context menu items with incognito true. | 744 // Remove all context menu items with incognito true. |
| 745 manager_.RemoveAllIncognitoContextItems(); | 745 manager_.RemoveAllIncognitoContextItems(); |
| 746 EXPECT_EQ(2u, manager_.MenuItems(extension1->id())->size()); | 746 EXPECT_EQ(2u, manager_.MenuItems(extension1->id())->size()); |
| 747 EXPECT_EQ(1u, manager_.MenuItems(extension2->id())->size()); | 747 EXPECT_EQ(1u, manager_.MenuItems(extension2->id())->size()); |
| 748 } | 748 } |
| 749 | 749 |
| 750 } // namespace extensions | 750 } // namespace extensions |
| OLD | NEW |