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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_textfield_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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/ui/cocoa/autofill/autofill_textfield.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_textfield.h"
6 6
7 #import "base/mac/scoped_nsobject.h" 7 #import "base/mac/scoped_nsobject.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 9 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "testing/gtest_mac.h" 11 #include "testing/gtest_mac.h"
12 #include "testing/platform_test.h" 12 #include "testing/platform_test.h"
13 #include "ui/events/test/cocoa_test_event_utils.h" 13 #include "ui/events/test/cocoa_test_event_utils.h"
14 14
15 class AutofillTextFieldTest : public CocoaTest { 15 class AutofillTextFieldTest : public CocoaTest {
16 public: 16 public:
17 AutofillTextFieldTest() { 17 AutofillTextFieldTest() {
18 NSRect frame = NSMakeRect(0, 0, 50, 30); 18 NSRect frame = NSMakeRect(0, 0, 50, 30);
19 textfield_.reset([[AutofillTextField alloc] initWithFrame:frame]); 19 textfield_.reset([[AutofillTextField alloc] initWithFrame:frame]);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 // Now test with multiline mode enabled. 70 // Now test with multiline mode enabled.
71 [textfield_ setIsMultiline:YES]; 71 [textfield_ setIsMultiline:YES];
72 [textfield_ setStringValue:@""]; 72 [textfield_ setStringValue:@""];
73 [[textfield_ currentEditor] insertText:@"foo"]; 73 [[textfield_ currentEditor] insertText:@"foo"];
74 [[textfield_ currentEditor] 74 [[textfield_ currentEditor]
75 keyDown:cocoa_test_event_utils::KeyEventWithCharacter('\n')]; 75 keyDown:cocoa_test_event_utils::KeyEventWithCharacter('\n')];
76 [[textfield_ currentEditor] insertText:@"bar"]; 76 [[textfield_ currentEditor] insertText:@"bar"];
77 EXPECT_NSEQ(@"foo\nbar", [textfield_ stringValue]); 77 EXPECT_NSEQ(@"foo\nbar", [textfield_ stringValue]);
78 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698