| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/string_util.h" | 5 #include "base/string_util.h" |
| 6 #include "base/sys_string_conversions.h" | 6 #include "base/sys_string_conversions.h" |
| 7 #include "chrome/browser/browser_window.h" | 7 #include "chrome/browser/browser_window.h" |
| 8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
| 9 #import "chrome/browser/ui/cocoa/find_bar_cocoa_controller.h" | 9 #import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h" |
| 10 #import "chrome/browser/ui/cocoa/find_pasteboard.h" | 10 #import "chrome/browser/ui/cocoa/find_pasteboard.h" |
| 11 #import "chrome/browser/ui/cocoa/find_bar_text_field.h" | 11 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field.h" |
| 12 #include "chrome/browser/ui/find_bar/find_notification_details.h" | 12 #include "chrome/browser/ui/find_bar/find_notification_details.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 #include "testing/platform_test.h" | 14 #include "testing/platform_test.h" |
| 15 | 15 |
| 16 // Expose private variables to make testing easier. | 16 // Expose private variables to make testing easier. |
| 17 @interface FindBarCocoaController(Testing) | 17 @interface FindBarCocoaController(Testing) |
| 18 - (NSView*)findBarView; | 18 - (NSView*)findBarView; |
| 19 - (NSString*)findText; | 19 - (NSString*)findText; |
| 20 - (FindBarTextField*)findTextField; | 20 - (FindBarTextField*)findTextField; |
| 21 @end | 21 @end |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 TEST_F(FindBarCocoaControllerTest, SettingFindTextUpdatesFindPboard) { | 129 TEST_F(FindBarCocoaControllerTest, SettingFindTextUpdatesFindPboard) { |
| 130 NSString* const kFindText = | 130 NSString* const kFindText = |
| 131 @"It's not a bird, it's not a plane, it must be Dave who's on the train"; | 131 @"It's not a bird, it's not a plane, it must be Dave who's on the train"; |
| 132 [controller_ setFindText:kFindText]; | 132 [controller_ setFindText:kFindText]; |
| 133 EXPECT_EQ( | 133 EXPECT_EQ( |
| 134 NSOrderedSame, | 134 NSOrderedSame, |
| 135 [[[FindPasteboard sharedInstance] findText] compare:kFindText]); | 135 [[[FindPasteboard sharedInstance] findText] compare:kFindText]); |
| 136 } | 136 } |
| 137 | 137 |
| 138 } // namespace | 138 } // namespace |
| OLD | NEW |