| Index: chrome/browser/extensions/web_view_interactive_browsertest.cc
|
| diff --git a/chrome/browser/extensions/web_view_interactive_browsertest.cc b/chrome/browser/extensions/web_view_interactive_browsertest.cc
|
| index af1953c21d449a01b0b8c819cc6a58e8ff67b594..b0f80607ddac9c1254fca4e24eb952d63af2b5ad 100644
|
| --- a/chrome/browser/extensions/web_view_interactive_browsertest.cc
|
| +++ b/chrome/browser/extensions/web_view_interactive_browsertest.cc
|
| @@ -73,6 +73,11 @@ class WebViewInteractiveTest
|
| #endif
|
| }
|
|
|
| + void SendStartOfLineKeyPressToPlatformApp() {
|
| + ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
|
| + GetPlatformAppWindow(), ui::VKEY_LEFT, false, false, false, true));
|
| + }
|
| +
|
| void SendMouseEvent(ui_controls::MouseButton button,
|
| ui_controls::MouseButtonState state) {
|
| if (first_click_) {
|
| @@ -348,10 +353,29 @@ IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, EditCommands) {
|
|
|
| ExtensionTestMessageListener copy_listener("copy", false);
|
| SendCopyKeyPressToPlatformApp();
|
| +
|
| // Wait for the guest to receive a 'copy' edit command.
|
| ASSERT_TRUE(copy_listener.WaitUntilSatisfied());
|
| }
|
|
|
| +// Tests that guests receive edit commands and respond appropriately.
|
| +IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, EditCommandsNoMenu) {
|
| + SetupTest("web_view/edit_commands_no_menu",
|
| + "files/extensions/platform_apps/web_view/edit_commands_no_menu/"
|
| + "guest.html");
|
| +
|
| + ASSERT_TRUE(ui_test_utils::ShowAndFocusNativeWindow(
|
| + GetPlatformAppWindow()));
|
| +
|
| + // Flush any pending events to make sure we start with a clean slate.
|
| + content::RunAllPendingInMessageLoop();
|
| +
|
| + ExtensionTestMessageListener start_of_line_listener("StartOfLine", false);
|
| + SendStartOfLineKeyPressToPlatformApp();
|
| + // Wait for the guest to receive a 'copy' edit command.
|
| + ASSERT_TRUE(start_of_line_listener.WaitUntilSatisfied());
|
| +}
|
| +
|
| // Disabled due to timeouts/crashing on several platforms. crbug.com/241912
|
| IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, DISABLED_NewWindow) {
|
| ASSERT_TRUE(StartTestServer()); // For serving guest pages.
|
|
|