| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1510 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( | 1510 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( |
| 1511 GetPlatformAppWindow(), ui::VKEY_Z, false, false, false, false)); | 1511 GetPlatformAppWindow(), ui::VKEY_Z, false, false, false, false)); |
| 1512 | 1512 |
| 1513 next_step_listener.Reset(); | 1513 next_step_listener.Reset(); |
| 1514 EXPECT_TRUE(content::ExecuteScript( | 1514 EXPECT_TRUE(content::ExecuteScript( |
| 1515 embedder_web_contents(), | 1515 embedder_web_contents(), |
| 1516 "window.runCommand('testKeyboardFocusRunNextStep', 'aBcxYz');")); | 1516 "window.runCommand('testKeyboardFocusRunNextStep', 'aBcxYz');")); |
| 1517 | 1517 |
| 1518 ASSERT_TRUE(next_step_listener.WaitUntilSatisfied()); | 1518 ASSERT_TRUE(next_step_listener.WaitUntilSatisfied()); |
| 1519 } | 1519 } |
| 1520 |
| 1521 class ExampleTest : public WebViewInteractiveTestBase {}; |
| 1522 |
| 1523 IN_PROC_BROWSER_TEST_F(ExampleTest, Basic) { |
| 1524 LoadAndLaunchPlatformApp("example/basic", |
| 1525 "LOADED"); |
| 1526 ExtensionTestMessageListener key_processed_listener( |
| 1527 "KEY_UP", false); |
| 1528 |
| 1529 for (size_t i = 0; i < 4; ++i) { |
| 1530 SendKeyPressToPlatformApp(ui::VKEY_TAB); |
| 1531 EXPECT_TRUE(key_processed_listener.WaitUntilSatisfied()); |
| 1532 key_processed_listener.Reset(); |
| 1533 } |
| 1534 } |
| OLD | NEW |