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

Side by Side Diff: ui/base/cocoa/controls/hyperlink_text_view_unittest.mm

Issue 595283002: Move nsview_additions and hyperlink_text_view to ui/base/cocoa (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 months 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 #include "base/mac/scoped_nsobject.h" 5 #include "base/mac/scoped_nsobject.h"
6 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
7 #import "chrome/browser/ui/cocoa/hyperlink_text_view.h"
8 #include "testing/gtest_mac.h" 6 #include "testing/gtest_mac.h"
7 #import "ui/base/cocoa/controls/hyperlink_text_view.h"
8 #import "ui/gfx/test/ui_cocoa_test_helper.h"
9 9
10 namespace { 10 namespace {
11 11
12 class HyperlinkTextViewTest : public CocoaTest { 12 class HyperlinkTextViewTest : public ui::CocoaTest {
13 public: 13 public:
14 HyperlinkTextViewTest() { 14 HyperlinkTextViewTest() {
15 NSRect frame = NSMakeRect(0, 0, 50, 50); 15 NSRect frame = NSMakeRect(0, 0, 50, 50);
16 base::scoped_nsobject<HyperlinkTextView> view( 16 base::scoped_nsobject<HyperlinkTextView> view(
17 [[HyperlinkTextView alloc] initWithFrame:frame]); 17 [[HyperlinkTextView alloc] initWithFrame:frame]);
18 view_ = view.get(); 18 view_ = view.get();
19 [[test_window() contentView] addSubview:view_]; 19 [[test_window() contentView] addSubview:view_];
20 } 20 }
21 21
22 NSFont* GetDefaultFont() { 22 NSFont* GetDefaultFont() {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 188
189 TEST_F(HyperlinkTextViewTest, FirstResponderBehavior) { 189 TEST_F(HyperlinkTextViewTest, FirstResponderBehavior) {
190 // By default, accept. 190 // By default, accept.
191 EXPECT_TRUE([view_ acceptsFirstResponder]); 191 EXPECT_TRUE([view_ acceptsFirstResponder]);
192 192
193 [view_ setRefusesFirstResponder:YES]; 193 [view_ setRefusesFirstResponder:YES];
194 EXPECT_FALSE([view_ acceptsFirstResponder]); 194 EXPECT_FALSE([view_ acceptsFirstResponder]);
195 } 195 }
196 196
197 } // namespace 197 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698