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

Side by Side Diff: chrome/browser/ui/cocoa/constrained_window/constrained_window_button_unittest.mm

Issue 2565813002: Create c/b/ui/cocoa/test and move test files to there (Closed)
Patch Set: Rebase Created 4 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 "base/mac/scoped_nsobject.h" 5 #import "base/mac/scoped_nsobject.h"
6 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
7 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h" 6 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h"
7 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "testing/platform_test.h" 9 #include "testing/platform_test.h"
10 #import "ui/events/test/cocoa_test_event_utils.h" 10 #import "ui/events/test/cocoa_test_event_utils.h"
11 11
12 class ConstrainedWindowButtonTest : public CocoaTest { 12 class ConstrainedWindowButtonTest : public CocoaTest {
13 public: 13 public:
14 ConstrainedWindowButtonTest() { 14 ConstrainedWindowButtonTest() {
15 NSRect frame = NSMakeRect(0, 0, 50, 30); 15 NSRect frame = NSMakeRect(0, 0, 50, 30);
16 button_.reset([[ConstrainedWindowButton alloc] initWithFrame:frame]); 16 button_.reset([[ConstrainedWindowButton alloc] initWithFrame:frame]);
17 [button_ setTitle:@"Abcdefg"]; 17 [button_ setTitle:@"Abcdefg"];
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // Tracking rects 52 // Tracking rects
53 TEST_F(ConstrainedWindowButtonTest, TrackingRects) { 53 TEST_F(ConstrainedWindowButtonTest, TrackingRects) {
54 ConstrainedWindowButtonCell* cell = [button_ cell]; 54 ConstrainedWindowButtonCell* cell = [button_ cell];
55 EXPECT_FALSE([cell isMouseInside]); 55 EXPECT_FALSE([cell isMouseInside]);
56 56
57 [button_ mouseEntered:cocoa_test_event_utils::EnterEvent()]; 57 [button_ mouseEntered:cocoa_test_event_utils::EnterEvent()];
58 EXPECT_TRUE([cell isMouseInside]); 58 EXPECT_TRUE([cell isMouseInside]);
59 [button_ mouseExited:cocoa_test_event_utils::ExitEvent()]; 59 [button_ mouseExited:cocoa_test_event_utils::ExitEvent()];
60 EXPECT_FALSE([cell isMouseInside]); 60 EXPECT_FALSE([cell isMouseInside]);
61 } 61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698