Infobar material design refresh: layout
[chromium-blink-merge.git] / chrome / browser / ui / tabs / tab_menu_model_unittest.cc
blobef7e1dad8091c7efcf75e6135eb3e9500d32f04c
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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/tabs/tab_menu_model.h"
7 #include "chrome/browser/ui/browser_commands.h"
8 #include "chrome/test/base/browser_with_test_window_test.h"
9 #include "chrome/test/base/menu_model_test.h"
10 #include "testing/gtest/include/gtest/gtest.h"
12 class TabMenuModelTest : public MenuModelTest,
13 public BrowserWithTestWindowTest {
16 TEST_F(TabMenuModelTest, Basics) {
17 chrome::NewTab(browser());
18 TabMenuModel model(&delegate_, browser()->tab_strip_model(), 0);
20 // Verify it has items. The number varies by platform, so we don't check
21 // the exact number.
22 EXPECT_GT(model.GetItemCount(), 5);
24 int item_count = 0;
25 CountEnabledExecutable(&model, &item_count);
26 EXPECT_GT(item_count, 0);
27 EXPECT_EQ(item_count, delegate_.execute_count_);
28 EXPECT_EQ(item_count, delegate_.enable_count_);