New issue
Advanced search Search tips

Issue 683841 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

[Missing Tests]: Cancel drag operation when the tab RenderWidgetHostView does not exist (Mac)

Project Member Reported by tkonch...@chromium.org, Jan 23 2017

Issue description

ekaramad@, Automated tests for the below commit have been missing and would be really great to add them ASAP since these issues are high priority regressions.

Commit:   https://codereview.chromium.org/2547213002

Ref. Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=670645

Thanks,
 
Cc: paulmeyer@chromium.org
cc-ing paulmeyer@ who is more familiar with DnD.

Paul: Are you familiar with the process for these types of tests? This is for the drag and drop bug where dropping something on chrome://crash page would crash the browser due to RWHV being nullptr. I think ideally, a test should try to drop something on chrome://crash (and automatically pass since it should not crash). Could you please take a look or point me to the right direction?
Maybe DragAndDropBrowserTest.CrossSiteDrag (in chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc) can be adapted to cover this scenario (first step would be to make NavigateRightFrame at the beginning of the test navigate to chrome://crash).
Status: Started (was: Assigned)
Thanks lukasza@! Seems like the place to add the test. Although, we need the top-level to navigate to chrome://crash to reproduce the exact scenario. Also, can we navigate a frame to chrome://crash?

Comment 4 by lfg@chromium.org, May 18 2017

Re #2: I think this issue is Mac-only, and DragAndDropBrowserTest.CrossSiteDrag only supports Aura on Linux.

Unfortunately the test is aura only :(.
I am not aware of existing tests that drag across tabs or windows.  OTOH, this should in theory be doable (although one needs to avoid working with overlapping windows OR one needs to wait until hovering over a tab's header activates the tab).  But... maybe your scenario can simulated in a way similar to DragImageFromDisappearingFrame (i.e. you could initiate a drag and while the drag is still happening kill the whole page).

Good point about subframes - crashing *just* a subframe won't work unless the frame is an OOPIF (e.g. unless the test runs with --site-per-process).  OTOH, maybe a crashed OOPIF is a similar enough scenario to count as a regeression test?  Also - I see that renderer cannot initiate a navigation to chrome://crash (so crashing the OOPIF would have to be accomplished by having the browser test kill the RenderProcessHost or by initiating chrome://crash navigation from the browser side [not sure if this ability for individual RenderFrameHosts is exposed through //content's public API).
FWIW, I have a WIP CL @ https://codereview.chromium.org/2622733002 for adding Mac support to these tests.  The problem with the CL is that something fishy is going on with mouse coordinates during the simulated drag.
Thanks Lukasza! I think I will wait for the Mac CL to land and retry. The test I had in mind was something like this:

{
ui_test_utils::NavigateToURL(browser(), some_url);
ui_test_utils::NavigateToURL(browser(), GURL("chrome://crash")); 
// or web_contents()->GetProcess()->Shutdown(0, false);
drag_simulator_->SimulateDragEnter(gfx::Point(), "abc");
drag_simulator_->SimulateDrop(gfx::Point());
}

and this should not crash. I think at the time of the bug we had proper coverage for RWHVCF destruction and Drag and Drop. But the test could be extended to adding OOPIFs and trying crashing the OOPIF process as well.
Components: -Internals

Sign in to add a comment