OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/keyboard_codes.h" | 8 #include "base/keyboard_codes.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 data.suppress_textinput, data.result_length); | 306 data.suppress_textinput, data.result_length); |
307 for (int i = 0; i < data.result_length; ++i) { | 307 for (int i = 0; i < data.result_length; ++i) { |
308 desc.append(" "); | 308 desc.append(" "); |
309 desc.append(data.result[i]); | 309 desc.append(data.result[i]); |
310 desc.append("\n"); | 310 desc.append("\n"); |
311 } | 311 } |
312 return desc; | 312 return desc; |
313 } | 313 } |
314 }; | 314 }; |
315 | 315 |
316 } // namespace | |
317 | |
318 IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, NormalKeyEvents) { | 316 IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, NormalKeyEvents) { |
319 static const KeyEventTestData kTestNoInput[] = { | 317 static const KeyEventTestData kTestNoInput[] = { |
320 // a | 318 // a |
321 { base::VKEY_A, false, false, false, false, | 319 { base::VKEY_A, false, false, false, false, |
322 false, false, false, false, 3, | 320 false, false, false, false, 3, |
323 { "D 65 0 false false false false", | 321 { "D 65 0 false false false false", |
324 "P 97 97 false false false false", | 322 "P 97 97 false false false false", |
325 "U 65 0 false false false false" } }, | 323 "U 65 0 false false false false" } }, |
326 // shift-a | 324 // shift-a |
327 { base::VKEY_A, false, true, false, false, | 325 { base::VKEY_A, false, true, false, false, |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 | 875 |
878 ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER)); | 876 ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER)); |
879 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); | 877 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); |
880 | 878 |
881 int tab_index = browser()->selected_index(); | 879 int tab_index = browser()->selected_index(); |
882 ASSERT_NO_FATAL_FAILURE(SetFocusedElement(tab_index, L"A")); | 880 ASSERT_NO_FATAL_FAILURE(SetFocusedElement(tab_index, L"A")); |
883 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestPageUp)); | 881 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestPageUp)); |
884 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestPageDown)); | 882 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestPageDown)); |
885 EXPECT_NO_FATAL_FAILURE(CheckTextBoxValue(tab_index, L"A", L"")); | 883 EXPECT_NO_FATAL_FAILURE(CheckTextBoxValue(tab_index, L"A", L"")); |
886 } | 884 } |
| 885 |
| 886 } // namespace |
OLD | NEW |