| 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;
|
| }
|
|
|
|
|