DescriptionInitial browser tests for OOPIF support for drag-n-drop.
This CL adds a single test - dragging and dropping a piece of text from
outside of the browser into a cross-site frame. The test expectedly
fails for now in --site-per-process mode (the CL adds an exception
in site-per-process.content_browsertests.filter).
DOMMessageQueue
===============
The new test verifies whether appropriate javascript events have fired.
This is done by DOMMessageQueue, which has been tweaked slightly to
target only a specified WebContents and detect renderer crashes.
The modified DOMMessageQueue makes the old DOMOperationObserver
obsolete, so the CL deletes the old class and switches its users
to use DOMMessageQueue instead.
DomAutomationController::SendMsg was refusing to serialize and send
javascript objects. This restriction has been lifted (any object
type can be sent, as long as it can be serialized to JSON).
Simulation of drag-and-drop
===========================
The CL introduces a DragAndDropSimulator that helps with simulating
drag-and-drop events for WebContents. The simulator supports only
the minimum functionality required to enable the first OOPIF test:
- Currently the simulator only supports drag-enter (dragging something
from outside the browser into WebContenst) and drop events.
- Currently the simulator only works when WebContents is built on top
of aura UI abstraction/platform.
Test pages
==========
The CL provides a main test page (content/test/data/drag_and_drop/page.html)
which enables:
- Easy locating of subframes (which are positioned at fixed coordinates).
- Easy replacing of subframe contents, which are specified by URL query.
- This helps with testing various drag-and-drop scenarios (e.g. using
different subframes for testing drop with drop_target.html OR for
testing drag-start with image_source.html).
- This also helps exercise various OOPIF scenarios (e.g. using
subframes that are same-site or cross-site).
BUG=647249
Committed: https://crrev.com/f1cf6923ce29e2995e7deefa654d299fd5512d28
Cr-Commit-Position: refs/heads/master@{#429472}
Patch Set 1 #Patch Set 2 : First test is almost test complete (and doesn't work at all... :-P). #Patch Set 3 : Simulating drag from outside into the browser works. #Patch Set 4 : Some progress on dom event verification, but doesn't work yet... #Patch Set 5 : CL (with a first test) seems ready for final testing and review. #Patch Set 6 : Rebasing... #Patch Set 7 : Giving up and going back to using notifications. #
Total comments: 10
Patch Set 8 : Using DOMMessageQueue instead of DOMAutomationWaiter. #Patch Set 9 : Removing a DCHECK - apparently WebContents::FromRenderFrameHost can return null. #
Total comments: 6
Patch Set 10 : Addressed CR feedback from nick@. #Messages
Total messages: 40 (30 generated)
|