Issue metadata
Sign in to add a comment
|
[Missing Tests]: Cancel drag operation when the tab RenderWidgetHostView does not exist (Mac) |
||||||||||||||||||||
Issue descriptionekaramad@, 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,
,
May 18 2017
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).
,
May 18 2017
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?
,
May 18 2017
Re #2: I think this issue is Mac-only, and DragAndDropBrowserTest.CrossSiteDrag only supports Aura on Linux.
,
May 18 2017
Unfortunately the test is aura only :(.
,
May 18 2017
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).
,
May 18 2017
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.
,
May 18 2017
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.
,
Aug 23
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by ekaramad@chromium.org
, May 18 2017