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

Unified Diff: chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc

Issue 2686683004: ABANDONED CL: WaitForChildFrameSurfaceReady to avoid flaky test hangs. (Closed)
Patch Set: Created 3 years, 10 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 | content/browser/renderer_host/input/input_router_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc
diff --git a/chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc b/chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc
index 91bba25caf4462571acd2f4933a72d893487717f..b591b8f458bfdcc74ea0ead393d560747d9cbf65 100644
--- a/chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc
+++ b/chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc
@@ -670,6 +670,7 @@ class DragAndDropBrowserTest : public InProcessBrowserTest,
bool NavigateNamedFrame(const std::string& frame_name,
const std::string& origin,
const std::string& filename) {
+ LOG(ERROR) << "Navigating " << frame_name << " frame ...";
content::RenderFrameHost* frame = GetFrameByName(frame_name);
if (!frame)
return false;
@@ -695,20 +696,10 @@ class DragAndDropBrowserTest : public InProcessBrowserTest,
frame = GetFrameByName(frame_name);
DCHECK(frame);
- // Wait until frame contents (e.g. images) have painted (which should happen
- // in the animation frame that *starts* after the onload event - therefore
- // we need to wait for 2 animation frames).
- script = std::string(
- "requestAnimationFrame(function() {\n"
- " requestAnimationFrame(function() {\n"
- " domAutomationController.send(43);\n"
- " });\n"
- "});\n");
- if (!content::ExecuteScriptAndExtractInt(frame, script, &response))
- return false;
- if (response != 43)
- return false;
+ // Wait until frame contents have painted and are ready for hit testing.
+ WaitForChildFrameSurfaceReady(frame);
+ LOG(ERROR) << "Navigating " << frame_name << " frame ... done.";
return true;
}
« no previous file with comments | « no previous file | content/browser/renderer_host/input/input_router_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698