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 #include "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #if defined(OS_MACOSX) |
| 10 #import "base/mac/mac_util.h" |
| 11 #endif |
9 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
10 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
11 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
12 #include "base/values.h" | 15 #include "base/values.h" |
13 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 17 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
15 #include "chrome/common/chrome_notification_types.h" | 18 #include "chrome/common/chrome_notification_types.h" |
16 #include "chrome/common/chrome_paths.h" | 19 #include "chrome/common/chrome_paths.h" |
17 #include "chrome/test/base/interactive_test_utils.h" | 20 #include "chrome/test/base/interactive_test_utils.h" |
18 #include "chrome/test/base/in_process_browser_test.h" | 21 #include "chrome/test/base/in_process_browser_test.h" |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 browser(), ui::VKEY_W, true, false, false, false)); | 751 browser(), ui::VKEY_W, true, false, false, false)); |
749 #endif | 752 #endif |
750 | 753 |
751 ASSERT_NO_FATAL_FAILURE(wait_for_tab_closed.Wait()); | 754 ASSERT_NO_FATAL_FAILURE(wait_for_tab_closed.Wait()); |
752 | 755 |
753 EXPECT_EQ(1, browser()->tab_strip_model()->count()); | 756 EXPECT_EQ(1, browser()->tab_strip_model()->count()); |
754 } | 757 } |
755 | 758 |
756 #if defined(OS_MACOSX) | 759 #if defined(OS_MACOSX) |
757 IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, EditorKeyBindings) { | 760 IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, EditorKeyBindings) { |
| 761 // TODO(kbr): re-enable: http://crbug.com/222296 |
| 762 if (base::mac::IsOSMountainLionOrLater()) |
| 763 return; |
| 764 |
758 static const KeyEventTestData kTestCtrlA = { | 765 static const KeyEventTestData kTestCtrlA = { |
759 ui::VKEY_A, true, false, false, false, | 766 ui::VKEY_A, true, false, false, false, |
760 false, false, false, false, 4, | 767 false, false, false, false, 4, |
761 { "D 17 0 true false false false", | 768 { "D 17 0 true false false false", |
762 "D 65 0 true false false false", | 769 "D 65 0 true false false false", |
763 "U 65 0 true false false false", | 770 "U 65 0 true false false false", |
764 "U 17 0 true false false false" } | 771 "U 17 0 true false false false" } |
765 }; | 772 }; |
766 | 773 |
767 static const KeyEventTestData kTestCtrlF = { | 774 static const KeyEventTestData kTestCtrlF = { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress)); | 890 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress)); |
884 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 891 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
885 | 892 |
886 // Ctrl+Alt should have no effect. | 893 // Ctrl+Alt should have no effect. |
887 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey)); | 894 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey)); |
888 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 895 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
889 } | 896 } |
890 #endif | 897 #endif |
891 | 898 |
892 } // namespace | 899 } // namespace |
OLD | NEW |