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/tab_contents/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/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/spellchecker/spelling_service_client.h" | 13 #include "chrome/browser/spellchecker/spelling_service_client.h" |
14 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 14 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
15 #include "chrome/browser/tab_contents/render_view_context_menu_observer.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; |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 menu()->CreateRequestContext(); | 481 menu()->CreateRequestContext(); |
482 InitMenu("asdfkj", NULL); | 482 InitMenu("asdfkj", NULL); |
483 | 483 |
484 // Should have at least 2 entries. Separator, suggestion. | 484 // Should have at least 2 entries. Separator, suggestion. |
485 EXPECT_LT(2U, menu()->GetMenuSize()); | 485 EXPECT_LT(2U, menu()->GetMenuSize()); |
486 menu()->GetMenuItem(0, &item); | 486 menu()->GetMenuItem(0, &item); |
487 EXPECT_EQ(-1, item.command_id); | 487 EXPECT_EQ(-1, item.command_id); |
488 menu()->GetMenuItem(1, &item); | 488 menu()->GetMenuItem(1, &item); |
489 EXPECT_EQ(IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION, item.command_id); | 489 EXPECT_EQ(IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION, item.command_id); |
490 } | 490 } |
OLD | NEW |