| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/views/cocoa/bridged_native_widget.h" | 5 #import "ui/views/cocoa/bridged_native_widget.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 994 TEST_F(BridgedNativeWidgetTest, TextInput_DeleteToBeginningOfParagraph) { | 994 TEST_F(BridgedNativeWidgetTest, TextInput_DeleteToBeginningOfParagraph) { |
| 995 TestDeleteBeginning(@selector(deleteToBeginningOfParagraph:)); | 995 TestDeleteBeginning(@selector(deleteToBeginningOfParagraph:)); |
| 996 } | 996 } |
| 997 | 997 |
| 998 TEST_F(BridgedNativeWidgetTest, TextInput_DeleteToEndOfParagraph) { | 998 TEST_F(BridgedNativeWidgetTest, TextInput_DeleteToEndOfParagraph) { |
| 999 TestDeleteEnd(@selector(deleteToEndOfParagraph:)); | 999 TestDeleteEnd(@selector(deleteToEndOfParagraph:)); |
| 1000 } | 1000 } |
| 1001 | 1001 |
| 1002 // Test move commands against expectations set by |dummy_text_view_|. | 1002 // Test move commands against expectations set by |dummy_text_view_|. |
| 1003 TEST_F(BridgedNativeWidgetTest, TextInput_MoveEditingCommands) { | 1003 TEST_F(BridgedNativeWidgetTest, TextInput_MoveEditingCommands) { |
| 1004 // Broken on 10.9. http://crbug.com/621734. |
| 1005 if (base::mac::IsOSMavericks()) |
| 1006 return; |
| 1004 TestEditingCommands(kMoveActions); | 1007 TestEditingCommands(kMoveActions); |
| 1005 } | 1008 } |
| 1006 | 1009 |
| 1007 // Todo(karandeepb): Enable this test once the behavior of all move and select | 1010 // Todo(karandeepb): Enable this test once the behavior of all move and select |
| 1008 // commands are fixed. | 1011 // commands are fixed. |
| 1009 // Test move and select commands against expectations set by |dummy_text_view_|. | 1012 // Test move and select commands against expectations set by |dummy_text_view_|. |
| 1010 TEST_F(BridgedNativeWidgetTest, | 1013 TEST_F(BridgedNativeWidgetTest, |
| 1011 TextInput_MoveAndSelectEditingCommands_DISABLED) { | 1014 TextInput_MoveAndSelectEditingCommands_DISABLED) { |
| 1012 TestEditingCommands(kSelectActions); | 1015 TestEditingCommands(kSelectActions); |
| 1013 } | 1016 } |
| 1014 | 1017 |
| 1015 // Test delete commands against expectations set by |dummy_text_view_|. | 1018 // Test delete commands against expectations set by |dummy_text_view_|. |
| 1016 TEST_F(BridgedNativeWidgetTest, TextInput_DeleteCommands) { | 1019 TEST_F(BridgedNativeWidgetTest, TextInput_DeleteCommands) { |
| 1020 // Broken on 10.9. http://crbug.com/621734. |
| 1021 if (base::mac::IsOSMavericks()) |
| 1022 return; |
| 1017 TestEditingCommands(kDeleteActions); | 1023 TestEditingCommands(kDeleteActions); |
| 1018 } | 1024 } |
| 1019 | 1025 |
| 1020 // Test that we don't crash during an action message even if the TextInputClient | 1026 // Test that we don't crash during an action message even if the TextInputClient |
| 1021 // is nil. Regression test for crbug.com/615745. | 1027 // is nil. Regression test for crbug.com/615745. |
| 1022 TEST_F(BridgedNativeWidgetTest, NilTextInputClient) { | 1028 TEST_F(BridgedNativeWidgetTest, NilTextInputClient) { |
| 1023 [ns_view_ setTextInputClient:nil]; | 1029 [ns_view_ setTextInputClient:nil]; |
| 1024 NSMutableArray* selectors = [NSMutableArray array]; | 1030 NSMutableArray* selectors = [NSMutableArray array]; |
| 1025 [selectors addObjectsFromArray:kMoveActions]; | 1031 [selectors addObjectsFromArray:kMoveActions]; |
| 1026 [selectors addObjectsFromArray:kSelectActions]; | 1032 [selectors addObjectsFromArray:kSelectActions]; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1188 [center postNotificationName:NSWindowDidExitFullScreenNotification | 1194 [center postNotificationName:NSWindowDidExitFullScreenNotification |
| 1189 object:window]; | 1195 object:window]; |
| 1190 EXPECT_EQ(1, [window ignoredToggleFullScreenCount]); // No change. | 1196 EXPECT_EQ(1, [window ignoredToggleFullScreenCount]); // No change. |
| 1191 EXPECT_FALSE(bridge()->target_fullscreen_state()); | 1197 EXPECT_FALSE(bridge()->target_fullscreen_state()); |
| 1192 | 1198 |
| 1193 widget_->CloseNow(); | 1199 widget_->CloseNow(); |
| 1194 } | 1200 } |
| 1195 | 1201 |
| 1196 } // namespace test | 1202 } // namespace test |
| 1197 } // namespace views | 1203 } // namespace views |
| OLD | NEW |