| 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 "chrome/browser/tab_contents/spelling_menu_observer.h" | 5 #include "chrome/browser/renderer_context_menu/spelling_menu_observer.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "chrome/app/chrome_command_ids.h" | 12 #include "chrome/app/chrome_command_ids.h" |
| 13 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" |
| 14 #include "chrome/browser/renderer_context_menu/render_view_context_menu_observer
.h" |
| 13 #include "chrome/browser/spellchecker/spelling_service_client.h" | 15 #include "chrome/browser/spellchecker/spelling_service_client.h" |
| 14 #include "chrome/browser/tab_contents/render_view_context_menu.h" | |
| 15 #include "chrome/browser/tab_contents/render_view_context_menu_observer.h" | |
| 16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 18 #include "chrome/test/base/in_process_browser_test.h" | 18 #include "chrome/test/base/in_process_browser_test.h" |
| 19 #include "chrome/test/base/testing_profile.h" | 19 #include "chrome/test/base/testing_profile.h" |
| 20 | 20 |
| 21 using content::RenderViewHost; | 21 using content::RenderViewHost; |
| 22 using content::WebContents; | 22 using content::WebContents; |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 command_line->AppendSwitch(switches::kUseSpellingSuggestions); | 472 command_line->AppendSwitch(switches::kUseSpellingSuggestions); |
| 473 InitMenu("asdfkj", NULL); | 473 InitMenu("asdfkj", NULL); |
| 474 | 474 |
| 475 // Should have at least 2 entries. Separator, suggestion. | 475 // Should have at least 2 entries. Separator, suggestion. |
| 476 EXPECT_LT(2U, menu()->GetMenuSize()); | 476 EXPECT_LT(2U, menu()->GetMenuSize()); |
| 477 menu()->GetMenuItem(0, &item); | 477 menu()->GetMenuItem(0, &item); |
| 478 EXPECT_EQ(-1, item.command_id); | 478 EXPECT_EQ(-1, item.command_id); |
| 479 menu()->GetMenuItem(1, &item); | 479 menu()->GetMenuItem(1, &item); |
| 480 EXPECT_EQ(IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION, item.command_id); | 480 EXPECT_EQ(IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION, item.command_id); |
| 481 } | 481 } |
| OLD | NEW |