| OLD | NEW | 
|---|
| 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> | 
| 6 | 6 | 
| 7 #include "base/mac/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" | 
| 8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |  | 
| 9 #import "chrome/browser/ui/cocoa/styled_text_field.h" | 8 #import "chrome/browser/ui/cocoa/styled_text_field.h" | 
| 10 #import "chrome/browser/ui/cocoa/styled_text_field_cell.h" | 9 #import "chrome/browser/ui/cocoa/styled_text_field_cell.h" | 
| 11 #import "chrome/browser/ui/cocoa/styled_text_field_test_helper.h" | 10 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" | 
|  | 11 #import "chrome/browser/ui/cocoa/test/styled_text_field_test_helper.h" | 
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" | 
| 13 #import "testing/gtest_mac.h" | 13 #import "testing/gtest_mac.h" | 
| 14 | 14 | 
| 15 namespace { | 15 namespace { | 
| 16 | 16 | 
| 17 // 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 | 
| 18 // the time. | 18 // the time. | 
| 19 static const CGFloat kWidth(300.0); | 19 static const CGFloat kWidth(300.0); | 
| 20 | 20 | 
| 21 class StyledTextFieldTest : public CocoaTest { | 21 class StyledTextFieldTest : public CocoaTest { | 
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 188   EXPECT_TRUE(NSContainsRect(EditorFrame(), baseEditorFrame)); | 188   EXPECT_TRUE(NSContainsRect(EditorFrame(), baseEditorFrame)); | 
| 189 | 189 | 
| 190   // Setting the same margin and using -resetFieldEditorFrameIfNeeded should | 190   // Setting the same margin and using -resetFieldEditorFrameIfNeeded should | 
| 191   // result in the same frame as the standard focus machinery. | 191   // result in the same frame as the standard focus machinery. | 
| 192   [cell_ setRightMargin:kRightMargin]; | 192   [cell_ setRightMargin:kRightMargin]; | 
| 193   [field_ resetFieldEditorFrameIfNeeded]; | 193   [field_ resetFieldEditorFrameIfNeeded]; | 
| 194   EXPECT_NSEQ(baseEditorFrame, EditorFrame()); | 194   EXPECT_NSEQ(baseEditorFrame, EditorFrame()); | 
| 195 } | 195 } | 
| 196 | 196 | 
| 197 }  // namespace | 197 }  // namespace | 
| OLD | NEW | 
|---|