Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / toolbar / wrench_toolbar_button_cell_unittest.mm
blob31e96672f6c1745f1b4917e1ac5a48073a102a2f
1 // Copyright (c) 2013 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 #import "chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell.h"
7 #include "base/message_loop/message_loop.h"
8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
10 @interface TestWrenchToolbarButton : NSButton
11 @end
13 @implementation TestWrenchToolbarButton
15 + (Class)cellClass {
16   return [WrenchToolbarButtonCell class];
19 @end
21 class WrenchToolbarButtonCellTest : public CocoaTest {
22  protected:
23   WrenchToolbarButtonCellTest() {
24     base::scoped_nsobject<NSButton> button([[TestWrenchToolbarButton alloc]
25         initWithFrame:NSMakeRect(0, 0, 29, 29)]);
26     button_ = button;
27     [[test_window() contentView] addSubview:button_];
28   }
30   NSButton* button_;
31   base::scoped_nsobject<WrenchToolbarButtonCell> cell_;
32   base::MessageLoopForUI message_loop_;  // Needed for gfx::Animation.
34  private:
35   DISALLOW_COPY_AND_ASSIGN(WrenchToolbarButtonCellTest);
38 TEST_VIEW(WrenchToolbarButtonCellTest, button_)