Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / profiles / avatar_label_button_unittest.mm
bloba301626d34dd469144cf5181e6c52aded40a4462
1 // Copyright 2014 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/profiles/avatar_label_button.h"
7 #import <Cocoa/Cocoa.h>
9 #include "base/mac/scoped_nsobject.h"
10 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
11 #include "testing/gtest/include/gtest/gtest.h"
13 class AvatarLabelButtonTest : public CocoaTest {
14  public:
15   AvatarLabelButtonTest() {
16     NSRect content_frame = [[test_window() contentView] frame];
17     button_.reset([[AvatarLabelButton alloc] initWithFrame:content_frame]);
18     [[test_window() contentView] addSubview:button_];
19   }
21  protected:
22   base::scoped_nsobject<AvatarLabelButton> button_;
25 TEST_VIEW(AvatarLabelButtonTest, button_)
27 TEST_F(AvatarLabelButtonTest, TestHighlight) {
28   EXPECT_FALSE([[button_ cell] isHighlighted]);
29   [button_ display];
30   [[button_ cell] setHighlighted:YES];
31   [button_ display];