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

Side by Side Diff: chrome/browser/ui/cocoa/styled_text_field_unittest.mm

Issue 7031014: Support for better integration between OCMock and gtest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 | Annotate | Revision Log
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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "base/mac/cocoa_protocols.h" 7 #import "base/mac/cocoa_protocols.h"
8 #include "base/memory/scoped_nsobject.h" 8 #include "base/memory/scoped_nsobject.h"
9 #import "chrome/browser/ui/cocoa/styled_text_field.h" 9 #import "chrome/browser/ui/cocoa/styled_text_field.h"
10 #import "chrome/browser/ui/cocoa/styled_text_field_cell.h" 10 #import "chrome/browser/ui/cocoa/styled_text_field_cell.h"
11 #import "chrome/browser/ui/cocoa/styled_text_field_test_helper.h" 11 #import "chrome/browser/ui/cocoa/styled_text_field_test_helper.h"
12 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 12 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #import "third_party/ocmock/OCMock/OCMock.h"
15 14
16 namespace { 15 namespace {
17 16
18 // Width of the field so that we don't have to ask |field_| for it all 17 // Width of the field so that we don't have to ask |field_| for it all
19 // the time. 18 // the time.
20 static const CGFloat kWidth(300.0); 19 static const CGFloat kWidth(300.0);
21 20
22 class StyledTextFieldTest : public CocoaTest { 21 class StyledTextFieldTest : public CocoaTest {
23 public: 22 public:
24 StyledTextFieldTest() { 23 StyledTextFieldTest() {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 EXPECT_TRUE(NSContainsRect(EditorFrame(), baseEditorFrame)); 188 EXPECT_TRUE(NSContainsRect(EditorFrame(), baseEditorFrame));
190 189
191 // Setting the same margin and using -resetFieldEditorFrameIfNeeded should 190 // Setting the same margin and using -resetFieldEditorFrameIfNeeded should
192 // result in the same frame as the standard focus machinery. 191 // result in the same frame as the standard focus machinery.
193 [cell_ setRightMargin:kRightMargin]; 192 [cell_ setRightMargin:kRightMargin];
194 [field_ resetFieldEditorFrameIfNeeded]; 193 [field_ resetFieldEditorFrameIfNeeded];
195 EXPECT_TRUE(NSEqualRects(baseEditorFrame, EditorFrame())); 194 EXPECT_TRUE(NSEqualRects(baseEditorFrame, EditorFrame()));
196 } 195 }
197 196
198 } // namespace 197 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698