| 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.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 } | 288 } |
| 289 return desc; | 289 return desc; |
| 290 } | 290 } |
| 291 }; | 291 }; |
| 292 | 292 |
| 293 #if defined(OS_MACOSX) | 293 #if defined(OS_MACOSX) |
| 294 // http://crbug.com/81451 | 294 // http://crbug.com/81451 |
| 295 #define MAYBE_NormalKeyEvents DISABLED_NormalKeyEvents | 295 #define MAYBE_NormalKeyEvents DISABLED_NormalKeyEvents |
| 296 #elif defined(OS_LINUX) | 296 #elif defined(OS_LINUX) |
| 297 // http://crbug.com/129235 | 297 // http://crbug.com/129235 |
| 298 #define MAYBE_NormalKeyEvents FAILS_NormalKeyEvents | 298 #define MAYBE_NormalKeyEvents DISABLED_NormalKeyEvents |
| 299 #else | 299 #else |
| 300 #define MAYBE_NormalKeyEvents NormalKeyEvents | 300 #define MAYBE_NormalKeyEvents NormalKeyEvents |
| 301 #endif | 301 #endif |
| 302 | 302 |
| 303 IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_NormalKeyEvents) { | 303 IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_NormalKeyEvents) { |
| 304 static const KeyEventTestData kTestNoInput[] = { | 304 static const KeyEventTestData kTestNoInput[] = { |
| 305 // a | 305 // a |
| 306 { ui::VKEY_A, false, false, false, false, | 306 { ui::VKEY_A, false, false, false, false, |
| 307 false, false, false, false, 3, | 307 false, false, false, false, 3, |
| 308 { "D 65 0 false false false false", | 308 { "D 65 0 false false false false", |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 << "kTestWithInput[" << i << "] in password box failed:\n" | 392 << "kTestWithInput[" << i << "] in password box failed:\n" |
| 393 << GetTestDataDescription(kTestWithInput[i]); | 393 << GetTestDataDescription(kTestWithInput[i]); |
| 394 } | 394 } |
| 395 EXPECT_NO_FATAL_FAILURE(CheckTextBoxValue(tab_index, L"B", L"aA")); | 395 EXPECT_NO_FATAL_FAILURE(CheckTextBoxValue(tab_index, L"B", L"aA")); |
| 396 } | 396 } |
| 397 | 397 |
| 398 #if defined(OS_WIN) || defined(OS_LINUX) | 398 #if defined(OS_WIN) || defined(OS_LINUX) |
| 399 | 399 |
| 400 #if defined(OS_LINUX) | 400 #if defined(OS_LINUX) |
| 401 // http://crbug.com/129235 | 401 // http://crbug.com/129235 |
| 402 #define MAYBE_CtrlKeyEvents FAILS_CtrlKeyEvents | 402 #define MAYBE_CtrlKeyEvents DISABLED_CtrlKeyEvents |
| 403 #else | 403 #else |
| 404 #define MAYBE_CtrlKeyEvents CtrlKeyEvents | 404 #define MAYBE_CtrlKeyEvents CtrlKeyEvents |
| 405 #endif | 405 #endif |
| 406 | 406 |
| 407 IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_CtrlKeyEvents) { | 407 IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_CtrlKeyEvents) { |
| 408 static const KeyEventTestData kTestCtrlF = { | 408 static const KeyEventTestData kTestCtrlF = { |
| 409 ui::VKEY_F, true, false, false, false, | 409 ui::VKEY_F, true, false, false, false, |
| 410 false, false, false, false, 2, | 410 false, false, false, false, 2, |
| 411 { "D 17 0 true false false false", | 411 { "D 17 0 true false false false", |
| 412 "D 70 0 true false false false" } | 412 "D 70 0 true false false false" } |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCmdFSuppressKeyDown)); | 522 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCmdFSuppressKeyDown)); |
| 523 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 523 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
| 524 } | 524 } |
| 525 #endif | 525 #endif |
| 526 | 526 |
| 527 #if defined(OS_MACOSX) | 527 #if defined(OS_MACOSX) |
| 528 // http://crbug.com/81451 for mac | 528 // http://crbug.com/81451 for mac |
| 529 #define MAYBE_AccessKeys DISABLED_AccessKeys | 529 #define MAYBE_AccessKeys DISABLED_AccessKeys |
| 530 #elif defined(OS_LINUX) | 530 #elif defined(OS_LINUX) |
| 531 // http://crbug.com/129235 | 531 // http://crbug.com/129235 |
| 532 #define MAYBE_AccessKeys FAILS_AccessKeys | 532 #define MAYBE_AccessKeys DISABLED_AccessKeys |
| 533 #else | 533 #else |
| 534 #define MAYBE_AccessKeys AccessKeys | 534 #define MAYBE_AccessKeys AccessKeys |
| 535 #endif | 535 #endif |
| 536 | 536 |
| 537 IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_AccessKeys) { | 537 IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_AccessKeys) { |
| 538 #if defined(OS_MACOSX) | 538 #if defined(OS_MACOSX) |
| 539 // On Mac, access keys use ctrl+alt modifiers. | 539 // On Mac, access keys use ctrl+alt modifiers. |
| 540 static const KeyEventTestData kTestAccessA = { | 540 static const KeyEventTestData kTestAccessA = { |
| 541 ui::VKEY_A, true, false, true, false, | 541 ui::VKEY_A, true, false, true, false, |
| 542 false, false, false, false, 6, | 542 false, false, false, false, 6, |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress)); | 883 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress)); |
| 884 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 884 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
| 885 | 885 |
| 886 // Ctrl+Alt should have no effect. | 886 // Ctrl+Alt should have no effect. |
| 887 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey)); | 887 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey)); |
| 888 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 888 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
| 889 } | 889 } |
| 890 #endif | 890 #endif |
| 891 | 891 |
| 892 } // namespace | 892 } // namespace |
| OLD | NEW |