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/spellchecker_submenu_observer.h" | 5 #include "chrome/browser/tab_contents/spellchecker_submenu_observer.h" |
6 | 6 |
| 7 #include "base/prefs/pref_service.h" |
7 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
8 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/prefs/pref_service.h" | |
10 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 10 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
11 #include "chrome/browser/tab_contents/render_view_context_menu_observer.h" | 11 #include "chrome/browser/tab_contents/render_view_context_menu_observer.h" |
12 #include "chrome/common/pref_names.h" | 12 #include "chrome/common/pref_names.h" |
13 #include "chrome/test/base/in_process_browser_test.h" | 13 #include "chrome/test/base/in_process_browser_test.h" |
14 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
15 | 15 |
16 using content::RenderViewHost; | 16 using content::RenderViewHost; |
17 using content::WebContents; | 17 using content::WebContents; |
18 | 18 |
19 namespace { | 19 namespace { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 EXPECT_TRUE(menu->IsCommandIdChecked(IDC_CHECK_SPELLING_WHILE_TYPING)); | 147 EXPECT_TRUE(menu->IsCommandIdChecked(IDC_CHECK_SPELLING_WHILE_TYPING)); |
148 | 148 |
149 // Select this item and verify that the "Check Spelling While Typing" item is | 149 // Select this item and verify that the "Check Spelling While Typing" item is |
150 // not checked. Also, verify that the value of "browser.enable_spellchecking" | 150 // not checked. Also, verify that the value of "browser.enable_spellchecking" |
151 // is now false. | 151 // is now false. |
152 menu->ExecuteCommand(IDC_CHECK_SPELLING_WHILE_TYPING); | 152 menu->ExecuteCommand(IDC_CHECK_SPELLING_WHILE_TYPING); |
153 EXPECT_FALSE( | 153 EXPECT_FALSE( |
154 menu->GetPrefs()->GetBoolean(prefs::kEnableContinuousSpellcheck)); | 154 menu->GetPrefs()->GetBoolean(prefs::kEnableContinuousSpellcheck)); |
155 EXPECT_FALSE(menu->IsCommandIdChecked(IDC_CHECK_SPELLING_WHILE_TYPING)); | 155 EXPECT_FALSE(menu->IsCommandIdChecked(IDC_CHECK_SPELLING_WHILE_TYPING)); |
156 } | 156 } |
OLD | NEW |