Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: chrome/browser/ui/toolbar/app_menu_model_unittest.cc

Issue 2254273003: Remove text encoding UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/app_menu_model.h" 5 #include "chrome/browser/ui/toolbar/app_menu_model.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/defaults.h" 9 #include "chrome/browser/defaults.h"
10 #include "chrome/browser/prefs/browser_prefs.h" 10 #include "chrome/browser/prefs/browser_prefs.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 EXPECT_TRUE(model.IsEnabledAt(index1)); 196 EXPECT_TRUE(model.IsEnabledAt(index1));
197 EXPECT_EQ(0, error1->execute_count()); 197 EXPECT_EQ(0, error1->execute_count());
198 model.ActivatedAt(index1); 198 model.ActivatedAt(index1);
199 EXPECT_EQ(1, error1->execute_count()); 199 EXPECT_EQ(1, error1->execute_count());
200 200
201 EXPECT_TRUE(model.IsEnabledAt(index2)); 201 EXPECT_TRUE(model.IsEnabledAt(index2));
202 EXPECT_EQ(0, error2->execute_count()); 202 EXPECT_EQ(0, error2->execute_count());
203 model.ActivatedAt(index2); 203 model.ActivatedAt(index2);
204 EXPECT_EQ(1, error1->execute_count()); 204 EXPECT_EQ(1, error1->execute_count());
205 } 205 }
206
207 class EncodingMenuModelTest : public BrowserWithTestWindowTest,
208 public MenuModelTest {
209 };
210
211 TEST_F(EncodingMenuModelTest, IsCommandIdCheckedWithNoTabs) {
212 EncodingMenuModel model(browser());
213 ASSERT_EQ(NULL, browser()->tab_strip_model()->GetActiveWebContents());
214 EXPECT_FALSE(model.IsCommandIdChecked(IDC_ENCODING_WINDOWS1252));
215 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/app_menu_model.cc ('k') | chrome/browser/ui/toolbar/encoding_menu_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698