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

Side by Side Diff: chrome/browser/ui/cocoa/bubble_view_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 5
6 #include "base/mac/scoped_nsobject.h" 6 #include "base/mac/scoped_nsobject.h"
7 #import "chrome/browser/ui/cocoa/bubble_view.h" 7 #import "chrome/browser/ui/cocoa/bubble_view.h"
8 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" 8 #include "chrome/browser/ui/cocoa/test/cocoa_test_helper.h"
9 #import "testing/gtest_mac.h" 9 #import "testing/gtest_mac.h"
10 10
11 class BubbleViewTest : public CocoaTest { 11 class BubbleViewTest : public CocoaTest {
12 public: 12 public:
13 BubbleViewTest() { 13 BubbleViewTest() {
14 NSRect frame = NSMakeRect(0, 0, 50, 50); 14 NSRect frame = NSMakeRect(0, 0, 50, 50);
15 base::scoped_nsobject<BubbleView> view( 15 base::scoped_nsobject<BubbleView> view(
16 [[BubbleView alloc] initWithFrame:frame themeProvider:test_window()]); 16 [[BubbleView alloc] initWithFrame:frame themeProvider:test_window()]);
17 view_ = view.get(); 17 view_ = view.get();
18 [[test_window() contentView] addSubview:view_]; 18 [[test_window() contentView] addSubview:view_];
(...skipping 30 matching lines...) Expand all
49 [view_ setCornerFlags:kRoundedTopRightCorner | kRoundedTopLeftCorner]; 49 [view_ setCornerFlags:kRoundedTopRightCorner | kRoundedTopLeftCorner];
50 EXPECT_EQ([view_ cornerFlags], 50 EXPECT_EQ([view_ cornerFlags],
51 (unsigned long)kRoundedTopRightCorner | kRoundedTopLeftCorner); 51 (unsigned long)kRoundedTopRightCorner | kRoundedTopLeftCorner);
52 // Set no flags (all 4 draw corners are square). 52 // Set no flags (all 4 draw corners are square).
53 [view_ setCornerFlags:0]; 53 [view_ setCornerFlags:0];
54 EXPECT_EQ([view_ cornerFlags], 0UL); 54 EXPECT_EQ([view_ cornerFlags], 0UL);
55 // Set all bits. Meaningless past the first 4, but harmless to set too many. 55 // Set all bits. Meaningless past the first 4, but harmless to set too many.
56 [view_ setCornerFlags:0xFFFFFFFF]; 56 [view_ setCornerFlags:0xFFFFFFFF];
57 EXPECT_EQ([view_ cornerFlags], 0xFFFFFFFF); 57 EXPECT_EQ([view_ cornerFlags], 0xFFFFFFFF);
58 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698