| 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 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 for (size_t i = 0; i < arraysize(kTestWithInput); ++i) { | 388 for (size_t i = 0; i < arraysize(kTestWithInput); ++i) { |
| 389 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestWithInput[i])) | 389 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestWithInput[i])) |
| 390 << "kTestWithInput[" << i << "] in password box failed:\n" | 390 << "kTestWithInput[" << i << "] in password box failed:\n" |
| 391 << GetTestDataDescription(kTestWithInput[i]); | 391 << GetTestDataDescription(kTestWithInput[i]); |
| 392 } | 392 } |
| 393 EXPECT_NO_FATAL_FAILURE(CheckTextBoxValue(tab_index, L"B", L"aA")); | 393 EXPECT_NO_FATAL_FAILURE(CheckTextBoxValue(tab_index, L"B", L"aA")); |
| 394 } | 394 } |
| 395 | 395 |
| 396 #if defined(OS_WIN) || defined(OS_LINUX) | 396 #if defined(OS_WIN) || defined(OS_LINUX) |
| 397 | 397 |
| 398 #if defined(OS_LINUX) || (defined(OS_WIN) && defined(USE_AURA)) | 398 #if defined(OS_LINUX) || defined(OS_WIN) |
| 399 // Linux: http://crbug.com/129235 | 399 // Linux: http://crbug.com/129235 |
| 400 // Win Aura: crbug.com/269564 | 400 // Win: crbug.com/269564 |
| 401 #define MAYBE_CtrlKeyEvents DISABLED_CtrlKeyEvents | 401 #define MAYBE_CtrlKeyEvents DISABLED_CtrlKeyEvents |
| 402 #else | 402 #else |
| 403 #define MAYBE_CtrlKeyEvents CtrlKeyEvents | 403 #define MAYBE_CtrlKeyEvents CtrlKeyEvents |
| 404 #endif | 404 #endif |
| 405 | 405 |
| 406 IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_CtrlKeyEvents) { | 406 IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_CtrlKeyEvents) { |
| 407 static const KeyEventTestData kTestCtrlF = { | 407 static const KeyEventTestData kTestCtrlF = { |
| 408 ui::VKEY_F, true, false, false, false, | 408 ui::VKEY_F, true, false, false, false, |
| 409 false, false, false, false, 2, | 409 false, false, false, false, 2, |
| 410 { "D 17 0 true false false false", | 410 { "D 17 0 true false false false", |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 // On GTK, alt-0..9 are assigned as tab selection accelerators, so they can | 659 // On GTK, alt-0..9 are assigned as tab selection accelerators, so they can |
| 660 // not be used as accesskeys. | 660 // not be used as accesskeys. |
| 661 EXPECT_NO_FATAL_FAILURE(CheckFocusedElement(tab_index, L"")); | 661 EXPECT_NO_FATAL_FAILURE(CheckFocusedElement(tab_index, L"")); |
| 662 #else | 662 #else |
| 663 EXPECT_NO_FATAL_FAILURE(CheckFocusedElement(tab_index, L"1")); | 663 EXPECT_NO_FATAL_FAILURE(CheckFocusedElement(tab_index, L"1")); |
| 664 #endif | 664 #endif |
| 665 #endif | 665 #endif |
| 666 } | 666 } |
| 667 | 667 |
| 668 // Flaky, http://crbug.com/69475. | 668 // Flaky, http://crbug.com/69475. |
| 669 #if defined(OS_LINUX) || (defined(OS_WIN) && defined(USE_AURA)) | 669 #if defined(OS_LINUX) || defined(OS_WIN) |
| 670 #define MAYBE_ReservedAccelerators DISABLED_ReservedAccelerators | 670 #define MAYBE_ReservedAccelerators DISABLED_ReservedAccelerators |
| 671 #else | 671 #else |
| 672 #define MAYBE_ReservedAccelerators ReservedAccelerators | 672 #define MAYBE_ReservedAccelerators ReservedAccelerators |
| 673 #endif | 673 #endif |
| 674 IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_ReservedAccelerators) { | 674 IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_ReservedAccelerators) { |
| 675 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 675 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 676 | 676 |
| 677 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 677 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
| 678 GURL url = embedded_test_server()->GetURL(kTestingPage); | 678 GURL url = embedded_test_server()->GetURL(kTestingPage); |
| 679 ui_test_utils::NavigateToURL(browser(), url); | 679 ui_test_utils::NavigateToURL(browser(), url); |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress)); | 873 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress)); |
| 874 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 874 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
| 875 | 875 |
| 876 // Ctrl+Alt should have no effect. | 876 // Ctrl+Alt should have no effect. |
| 877 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey)); | 877 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey)); |
| 878 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 878 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
| 879 } | 879 } |
| 880 #endif | 880 #endif |
| 881 | 881 |
| 882 } // namespace | 882 } // namespace |
| OLD | NEW |