OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/ui/toolbar/wrench_menu_model.h" | 5 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" |
6 | 6 |
7 #include "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/test/base/browser_with_test_window_test.h" | 9 #include "chrome/test/base/browser_with_test_window_test.h" |
| 10 #include "chrome/test/base/menu_model_test.h" |
10 #include "chrome/test/base/testing_profile.h" | 11 #include "chrome/test/base/testing_profile.h" |
11 #include "chrome/test/menu_model_test.h" | |
12 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 class WrenchMenuModelTest : public BrowserWithTestWindowTest, | 15 class WrenchMenuModelTest : public BrowserWithTestWindowTest, |
16 public ui::AcceleratorProvider { | 16 public ui::AcceleratorProvider { |
17 public: | 17 public: |
18 // Don't handle accelerators. | 18 // Don't handle accelerators. |
19 virtual bool GetAcceleratorForCommandId( | 19 virtual bool GetAcceleratorForCommandId( |
20 int command_id, | 20 int command_id, |
21 ui::Accelerator* accelerator) { return false; } | 21 ui::Accelerator* accelerator) { return false; } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 class EncodingMenuModelTest : public BrowserWithTestWindowTest, | 98 class EncodingMenuModelTest : public BrowserWithTestWindowTest, |
99 public MenuModelTest { | 99 public MenuModelTest { |
100 }; | 100 }; |
101 | 101 |
102 TEST_F(EncodingMenuModelTest, IsCommandIdCheckedWithNoTabs) { | 102 TEST_F(EncodingMenuModelTest, IsCommandIdCheckedWithNoTabs) { |
103 EncodingMenuModel model(browser()); | 103 EncodingMenuModel model(browser()); |
104 ASSERT_EQ(NULL, browser()->GetSelectedTabContents()); | 104 ASSERT_EQ(NULL, browser()->GetSelectedTabContents()); |
105 EXPECT_FALSE(model.IsCommandIdChecked(IDC_ENCODING_ISO88591)); | 105 EXPECT_FALSE(model.IsCommandIdChecked(IDC_ENCODING_ISO88591)); |
106 } | 106 } |
OLD | NEW |