Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1360)

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 1869853002: Move the SubframeKeyboardEventRouting test to interactive_ui_tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interactive-tests
Patch Set: Fix EXPECT_EQ Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/site_per_process_browsertest.cc
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index 7140ce35c4b48b4a137d1b4a2aec06cd0cb28a95..81d59e169dfeaf36cfcef4f31eceb40d28a5daf5 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -4821,45 +4821,6 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
}
#endif // defined(USE_AURA)
-// Ensure that a cross-process subframe can receive keyboard events when in
-// focus. Flaky: https://crbug.com/596508.
-IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
- DISABLED_SubframeKeyboardEventRouting) {
- GURL main_url(embedded_test_server()->GetURL(
- "a.com", "/frame_tree/page_with_one_frame.html"));
- EXPECT_TRUE(NavigateToURL(shell(), main_url));
-
- WebContentsImpl* web_contents =
- static_cast<WebContentsImpl*>(shell()->web_contents());
- FrameTreeNode* root = web_contents->GetFrameTree()->root();
-
- GURL frame_url(
- embedded_test_server()->GetURL("b.com", "/page_with_input_field.html"));
- NavigateFrameToURL(root->child_at(0), frame_url);
-
- // Focus the subframe and then its input field. The return value
- // "input-focus" will be sent once the input field's focus event fires.
- FocusFrame(root->child_at(0));
- std::string result;
- EXPECT_TRUE(ExecuteScriptAndExtractString(
- root->child_at(0)->current_frame_host(), "focusInputField()", &result));
- EXPECT_EQ(result, "input-focus");
-
- // The subframe should now be focused.
- EXPECT_EQ(root->child_at(0), root->frame_tree()->GetFocusedFrame());
-
- // Generate a few keyboard events and route them to currently focused frame.
- SimulateKeyPress(web_contents, ui::VKEY_F, false, false, false, false);
- SimulateKeyPress(web_contents, ui::VKEY_O, false, false, false, false);
- SimulateKeyPress(web_contents, ui::VKEY_O, false, false, false, false);
-
- // Verify that the input field in the subframe received the keystrokes.
- EXPECT_TRUE(ExecuteScriptAndExtractString(
- root->child_at(0)->current_frame_host(),
- "window.domAutomationController.send(getInputFieldText());", &result));
- EXPECT_EQ("FOO", result);
-}
-
// Ensure that sequential focus navigation (advancing focused elements with
// <tab> and <shift-tab>) works across cross-process subframes.
// The test sets up six inputs fields in a page with two cross-process
« no previous file with comments | « chrome/browser/site_per_process_interactive_browsertest.cc ('k') | content/test/data/frame_tree/page_with_one_frame.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698