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/prefs/pref_service.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.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 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 EXPECT_TRUE(menu->IsCommandIdChecked(IDC_CHECK_SPELLING_WHILE_TYPING)); | 146 EXPECT_TRUE(menu->IsCommandIdChecked(IDC_CHECK_SPELLING_WHILE_TYPING)); |
147 | 147 |
148 // Select this item and verify that the "Check Spelling While Typing" item is | 148 // Select this item and verify that the "Check Spelling While Typing" item is |
149 // not checked. Also, verify that the value of "browser.enable_spellchecking" | 149 // not checked. Also, verify that the value of "browser.enable_spellchecking" |
150 // is now false. | 150 // is now false. |
151 menu->ExecuteCommand(IDC_CHECK_SPELLING_WHILE_TYPING, 0); | 151 menu->ExecuteCommand(IDC_CHECK_SPELLING_WHILE_TYPING, 0); |
152 EXPECT_FALSE( | 152 EXPECT_FALSE( |
153 menu->GetPrefs()->GetBoolean(prefs::kEnableContinuousSpellcheck)); | 153 menu->GetPrefs()->GetBoolean(prefs::kEnableContinuousSpellcheck)); |
154 EXPECT_FALSE(menu->IsCommandIdChecked(IDC_CHECK_SPELLING_WHILE_TYPING)); | 154 EXPECT_FALSE(menu->IsCommandIdChecked(IDC_CHECK_SPELLING_WHILE_TYPING)); |
155 } | 155 } |
OLD | NEW |