Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/renderer_context_menu/render_view_context_menu.h" | 5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
| 9 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 9 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 10 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 10 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 11 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti l.h" | 11 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti l.h" |
| 12 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 12 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 13 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
| 14 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test _utils.h" | |
|
Lei Zhang
2015/05/11 20:16:53
Is this needed?
megjablon
2015/05/11 22:58:40
Nope, sorry I missed this. This was left in here w
| |
| 14 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
| 15 #include "extensions/browser/extension_prefs.h" | 16 #include "extensions/browser/extension_prefs.h" |
| 16 #include "extensions/common/url_pattern.h" | 17 #include "extensions/common/url_pattern.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include "third_party/WebKit/public/web/WebContextMenuData.h" | 19 #include "third_party/WebKit/public/web/WebContextMenuData.h" |
| 19 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 20 | 21 |
| 21 using extensions::MenuItem; | 22 using extensions::MenuItem; |
| 22 using extensions::URLPatternSet; | 23 using extensions::URLPatternSet; |
| 23 | 24 |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 291 } | 292 } |
| 292 | 293 |
| 293 // Make sure the checking custom command id that is not enabled will not | 294 // Make sure the checking custom command id that is not enabled will not |
| 294 // cause DCHECK failure. | 295 // cause DCHECK failure. |
| 295 TEST_F(RenderViewContextMenuPrefsTest, | 296 TEST_F(RenderViewContextMenuPrefsTest, |
| 296 IsCustomCommandIdEnabled) { | 297 IsCustomCommandIdEnabled) { |
| 297 scoped_ptr<TestRenderViewContextMenu> menu(CreateContextMenu()); | 298 scoped_ptr<TestRenderViewContextMenu> menu(CreateContextMenu()); |
| 298 | 299 |
| 299 EXPECT_FALSE(menu->IsCommandIdEnabled(IDC_CONTENT_CONTEXT_CUSTOM_FIRST)); | 300 EXPECT_FALSE(menu->IsCommandIdEnabled(IDC_CONTENT_CONTEXT_CUSTOM_FIRST)); |
| 300 } | 301 } |
| OLD | NEW |