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

Side by Side Diff: chrome/browser/tab_menu_model_unittest.cc

Issue 1725006: Changes the tab menu to use pin and unpin instead of a check. The mac (Closed)
Patch Set: Merged with tip of tree and updated unit tests Created 10 years, 8 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
« no previous file with comments | « chrome/browser/tab_menu_model.cc ('k') | chrome/browser/views/tabs/tab.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include "chrome/browser/tab_menu_model.h" 5 #include "chrome/browser/tab_menu_model.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/test/menu_model_test.h" 8 #include "chrome/test/menu_model_test.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/platform_test.h" 10 #include "testing/platform_test.h"
11 11
12
13 class TabMenuModelTest : public PlatformTest, public MenuModelTest { 12 class TabMenuModelTest : public PlatformTest, public MenuModelTest {
14 }; 13 };
15 14
16 TEST_F(TabMenuModelTest, Basics) { 15 TEST_F(TabMenuModelTest, Basics) {
17 TabMenuModel model(&delegate_); 16 TabMenuModel model(&delegate_, true);
18 17
19 // Verify it has items. The number varies by platform, so we don't check 18 // Verify it has items. The number varies by platform, so we don't check
20 // the exact number. 19 // the exact number.
21 EXPECT_GT(model.GetItemCount(), 5); 20 EXPECT_GT(model.GetItemCount(), 5);
22 21
23 int item_count = 0; 22 int item_count = 0;
24 CountEnabledExecutable(&model, &item_count); 23 CountEnabledExecutable(&model, &item_count);
25 EXPECT_GT(item_count, 0); 24 EXPECT_GT(item_count, 0);
26 EXPECT_EQ(item_count, delegate_.execute_count_); 25 EXPECT_EQ(item_count, delegate_.execute_count_);
27 EXPECT_EQ(item_count, delegate_.enable_count_); 26 EXPECT_EQ(item_count, delegate_.enable_count_);
28 } 27 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_menu_model.cc ('k') | chrome/browser/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698