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/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
11 #include "chrome/app/chrome_command_ids.h" | 12 #include "chrome/app/chrome_command_ids.h" |
12 #include "chrome/browser/prefs/pref_service.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; |
22 using content::WebContents; | 22 using content::WebContents; |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 | 455 |
456 menu->GetMenuItem(2, &item); | 456 menu->GetMenuItem(2, &item); |
457 EXPECT_EQ(IDC_CONTENT_CONTEXT_SPELLING_TOGGLE, item.command_id); | 457 EXPECT_EQ(IDC_CONTENT_CONTEXT_SPELLING_TOGGLE, item.command_id); |
458 EXPECT_FALSE(item.enabled); | 458 EXPECT_FALSE(item.enabled); |
459 EXPECT_FALSE(item.hidden); | 459 EXPECT_FALSE(item.hidden); |
460 | 460 |
461 // Set incognito back to false to allow appropriate test cleanup. | 461 // Set incognito back to false to allow appropriate test cleanup. |
462 menu->GetProfile()->AsTestingProfile()->set_incognito(false); | 462 menu->GetProfile()->AsTestingProfile()->set_incognito(false); |
463 } | 463 } |
464 | 464 |
OLD | NEW |