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

Unified Diff: content/browser/accessibility/touch_accessibility_aura_browsertest.cc

Issue 2785793002: Fix TouchExplorationInCrossSiteIframe flakiness with OOPIFs enabled (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/touch_accessibility_aura_browsertest.cc
diff --git a/content/browser/accessibility/touch_accessibility_aura_browsertest.cc b/content/browser/accessibility/touch_accessibility_aura_browsertest.cc
index dd59c9d1d06d8bab28da0bb82a7e9e5dd459ca06..77ae888a7c26d84267e48d8df67d205495011e0a 100644
--- a/content/browser/accessibility/touch_accessibility_aura_browsertest.cc
+++ b/content/browser/accessibility/touch_accessibility_aura_browsertest.cc
@@ -5,12 +5,14 @@
#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
#include "content/browser/accessibility/browser_accessibility.h"
+#include "content/browser/frame_host/render_widget_host_view_child_frame.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/shell/browser/shell.h"
#include "content/test/accessibility_browser_test_utils.h"
+#include "content/test/content_browser_test_utils_internal.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "ui/accessibility/ax_node_data.h"
@@ -166,6 +168,15 @@ IN_PROC_BROWSER_TEST_F(TouchAccessibilityBrowserTest,
child_frame->GetOrCreateBrowserAccessibilityManager();
ASSERT_NE(nullptr, child_manager);
+ // If OOPIFs are enabled, wait until compositor frames are all properly
+ // displayed, otherwise the touch event will not get sent to the correct
+ // renderer process.
+ if (main_frame->GetView() != child_frame->GetView()) {
+ SurfaceHitTestReadyNotifier notifier(
+ static_cast<RenderWidgetHostViewChildFrame*>(child_frame->GetView()));
+ notifier.WaitForSurfaceReady();
+ }
+
// Send a touch exploration event to the button in the first iframe.
// A touch exploration event is just a mouse move event with
// the ui::EF_TOUCH_ACCESSIBILITY flag set.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698