| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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 #import "ui/message_center/cocoa/status_item_view.h" | 5 #import "ui/message_center/cocoa/status_item_view.h" |
| 6 | 6 |
| 7 #include "base/mac/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
| 8 #import "ui/gfx/test/ui_cocoa_test_helper.h" | 8 #import "ui/gfx/test/ui_cocoa_test_helper.h" |
| 9 | 9 |
| 10 class StatusItemViewTest : public ui::CocoaTest { | 10 class StatusItemViewTest : public ui::CocoaTest { |
| 11 public: | 11 public: |
| 12 StatusItemViewTest() | 12 StatusItemViewTest() |
| 13 : view_([[MCStatusItemView alloc] init]) { | 13 : view_([[MCStatusItemView alloc] init]) { |
| 14 } | 14 } |
| 15 | 15 |
| 16 virtual void SetUp() OVERRIDE { | 16 virtual void SetUp() override { |
| 17 ui::CocoaTest::SetUp(); | 17 ui::CocoaTest::SetUp(); |
| 18 [[test_window() contentView] addSubview:view_]; | 18 [[test_window() contentView] addSubview:view_]; |
| 19 } | 19 } |
| 20 | 20 |
| 21 virtual void TearDown() OVERRIDE { | 21 virtual void TearDown() override { |
| 22 [view_ removeItem]; | 22 [view_ removeItem]; |
| 23 ui::CocoaTest::TearDown(); | 23 ui::CocoaTest::TearDown(); |
| 24 } | 24 } |
| 25 | 25 |
| 26 protected: | 26 protected: |
| 27 base::scoped_nsobject<MCStatusItemView> view_; | 27 base::scoped_nsobject<MCStatusItemView> view_; |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 // These tests are like TEST_VIEW() but set some of the properties. | 30 // These tests are like TEST_VIEW() but set some of the properties. |
| 31 | 31 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 TEST_F(StatusItemViewTest, HighlightAndMouseEvent) { | 79 TEST_F(StatusItemViewTest, HighlightAndMouseEvent) { |
| 80 [view_ mouseDown:nil]; | 80 [view_ mouseDown:nil]; |
| 81 [view_ display]; | 81 [view_ display]; |
| 82 [view_ setHighlight:YES]; | 82 [view_ setHighlight:YES]; |
| 83 [view_ display]; | 83 [view_ display]; |
| 84 [view_ mouseUp:nil]; | 84 [view_ mouseUp:nil]; |
| 85 [view_ display]; | 85 [view_ display]; |
| 86 [view_ setHighlight:NO]; | 86 [view_ setHighlight:NO]; |
| 87 [view_ display]; | 87 [view_ display]; |
| 88 } | 88 } |
| OLD | NEW |