| 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/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/browser/ui/global_error.h" | 9 #include "chrome/browser/ui/global_error/global_error.h" |
| 10 #include "chrome/browser/ui/global_error_service.h" | 10 #include "chrome/browser/ui/global_error/global_error_service.h" |
| 11 #include "chrome/browser/ui/global_error_service_factory.h" | 11 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| 12 #include "chrome/test/base/browser_with_test_window_test.h" | 12 #include "chrome/test/base/browser_with_test_window_test.h" |
| 13 #include "chrome/test/base/menu_model_test.h" | 13 #include "chrome/test/base/menu_model_test.h" |
| 14 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
| 15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 // Error class has a menu item. | 20 // Error class has a menu item. |
| 21 class MenuError : public GlobalError { | 21 class MenuError : public GlobalError { |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 195 |
| 196 class EncodingMenuModelTest : public BrowserWithTestWindowTest, | 196 class EncodingMenuModelTest : public BrowserWithTestWindowTest, |
| 197 public MenuModelTest { | 197 public MenuModelTest { |
| 198 }; | 198 }; |
| 199 | 199 |
| 200 TEST_F(EncodingMenuModelTest, IsCommandIdCheckedWithNoTabs) { | 200 TEST_F(EncodingMenuModelTest, IsCommandIdCheckedWithNoTabs) { |
| 201 EncodingMenuModel model(browser()); | 201 EncodingMenuModel model(browser()); |
| 202 ASSERT_EQ(NULL, browser()->GetActiveWebContents()); | 202 ASSERT_EQ(NULL, browser()->GetActiveWebContents()); |
| 203 EXPECT_FALSE(model.IsCommandIdChecked(IDC_ENCODING_ISO88591)); | 203 EXPECT_FALSE(model.IsCommandIdChecked(IDC_ENCODING_ISO88591)); |
| 204 } | 204 } |
| OLD | NEW |