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

Unified Diff: chrome/browser/site_per_process_interactive_browsertest.cc

Issue 2804303004: Revert of OOPIF: Enable TabAndMouseFocusNavigation. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/FocusController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/site_per_process_interactive_browsertest.cc
diff --git a/chrome/browser/site_per_process_interactive_browsertest.cc b/chrome/browser/site_per_process_interactive_browsertest.cc
index 37d6ab4a8fa89e8ffe3a258a1a493b4e74675758..a70957281afadf435b28004b1bac835c89df0a7e 100644
--- a/chrome/browser/site_per_process_interactive_browsertest.cc
+++ b/chrome/browser/site_per_process_interactive_browsertest.cc
@@ -302,12 +302,11 @@
EXPECT_EQ(main_frame, web_contents->GetFocusedFrame());
}
-#if (defined(OS_LINUX) && !defined(USE_OZONE)) || defined(OS_WIN)
+// TODO(https://crbug.com/702330): Enable this test.
// Ensures that renderers know to advance focus to sibling frames and parent
// frames in the presence of mouse click initiated focus changes.
-// Verifies against regression of https://crbug.com/702330
IN_PROC_BROWSER_TEST_F(SitePerProcessInteractiveBrowserTest,
- TabAndMouseFocusNavigation) {
+ DISABLED_TabAndMouseFocusNavigation) {
GURL main_url(embedded_test_server()->GetURL(
"a.com", "/cross_site_iframe_factory.html?a(b,c)"));
ui_test_utils::NavigateToURL(browser(), main_url);
@@ -337,6 +336,7 @@
// iframe: 55,18;55,67
std::string script =
"function onFocus(e) {"
+ " console.log(window.name+'-focused-'+ e.target.id);"
" domAutomationController.setAutomationId(0);"
" domAutomationController.send(window.name + '-focused-' + e.target.id);"
"}"
@@ -433,59 +433,47 @@
EXPECT_EQ("\"root-focused-input1\"",
click_element_and_wait_for_message(main_frame_input_coords[0]));
EXPECT_EQ(main_frame, web_contents->GetFocusedFrame());
- auto frame_focused = base::MakeUnique<content::FrameFocusedObserver>(child1);
EXPECT_EQ("\"child1-focused-input1\"",
click_element_and_wait_for_message(child1_input_coords[0]));
- frame_focused->Wait();
- frame_focused = base::MakeUnique<content::FrameFocusedObserver>(main_frame);
+ EXPECT_EQ(child1, web_contents->GetFocusedFrame());
EXPECT_EQ("\"root-focused-input1\"", press_tab_and_wait_for_message(true));
- frame_focused->Wait();
+ EXPECT_EQ(main_frame, web_contents->GetFocusedFrame());
// Tab from child2 forward to root.
EXPECT_EQ("\"root-focused-input2\"",
click_element_and_wait_for_message(main_frame_input_coords[1]));
EXPECT_EQ(main_frame, web_contents->GetFocusedFrame());
- frame_focused = base::MakeUnique<content::FrameFocusedObserver>(child2);
EXPECT_EQ("\"child2-focused-input2\"",
click_element_and_wait_for_message(child2_input_coords[1]));
- frame_focused->Wait();
- frame_focused = base::MakeUnique<content::FrameFocusedObserver>(main_frame);
+ EXPECT_EQ(child2, web_contents->GetFocusedFrame());
EXPECT_EQ("\"root-focused-input2\"", press_tab_and_wait_for_message(false));
- frame_focused->Wait();
+ EXPECT_EQ(main_frame, web_contents->GetFocusedFrame());
// Tab forward from child1 to child2.
- frame_focused = base::MakeUnique<content::FrameFocusedObserver>(child2);
EXPECT_EQ("\"child2-focused-input1\"",
click_element_and_wait_for_message(child2_input_coords[0]));
- frame_focused->Wait();
- frame_focused = base::MakeUnique<content::FrameFocusedObserver>(child1);
+ EXPECT_EQ(child2, web_contents->GetFocusedFrame());
EXPECT_EQ("\"child1-focused-input2\"",
click_element_and_wait_for_message(child1_input_coords[1]));
- frame_focused->Wait();
- frame_focused = base::MakeUnique<content::FrameFocusedObserver>(child2);
+ EXPECT_EQ(child1, web_contents->GetFocusedFrame());
EXPECT_EQ("\"child2-focused-input1\"", press_tab_and_wait_for_message(false));
- frame_focused->Wait();
+ EXPECT_EQ(child2, web_contents->GetFocusedFrame());
// Tab backward from child2 to child1.
- frame_focused = base::MakeUnique<content::FrameFocusedObserver>(child1);
EXPECT_EQ("\"child1-focused-input2\"",
click_element_and_wait_for_message(child1_input_coords[1]));
- frame_focused->Wait();
- frame_focused = base::MakeUnique<content::FrameFocusedObserver>(child2);
+ EXPECT_EQ(child1, web_contents->GetFocusedFrame());
EXPECT_EQ("\"child2-focused-input1\"",
click_element_and_wait_for_message(child2_input_coords[0]));
- frame_focused->Wait();
- frame_focused = base::MakeUnique<content::FrameFocusedObserver>(child1);
+ EXPECT_EQ(child2, web_contents->GetFocusedFrame());
EXPECT_EQ("\"child1-focused-input2\"", press_tab_and_wait_for_message(true));
- // EXPECT_EQ(child1, web_contents->GetFocusedFrame());
- frame_focused->Wait();
+ EXPECT_EQ(child1, web_contents->GetFocusedFrame());
// Ensure there are no pending focus events after tabbing.
EXPECT_EQ("\"root-focused-input1\"",
click_element_and_wait_for_message(main_frame_input_coords[0]))
<< "Unexpected extra focus events.";
}
-#endif
namespace {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698