New issue
Advanced search Search tips

Issue 616608 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 477150
issue 644997



Sign in to add a comment

EventSender doesn't work with OOPIFs (e.g. test-generated mouse click is lost?)

Project Member Reported by lukasza@chromium.org, Jun 1 2016

Issue description

Repro:
$ ninja -C out/gn ... blink_tests
$ third_party/WebKit/Tools/Scripts/run-webkit-tests -t gn -v --no-retry-failures --additional-drt-flag=--site-per-process http/tests/security/referrer-policy-redirect-link.html

Expected behavior: test passes

Actual behavior: test fails
 
Cc: kenrb@chromium.org
Ken, I wonder if you could take a look please? (or give hints on how to debug processing of the test generated mouse events)

It seems that eventSender.mouseMoveTo/mouseDown/mouseUp called in http/tests/security/resources/referrer-policy-redirect-link.html don't have the expected effect of kicking off a navigation to security/resources/referrer-policy-postmessage.php.

I think that EventSender::MouseMoveTo gets executed in the right renderer process, but I am not sure if the same coordinates will work in and out of --site-per-process.

I am guessing that the test cannot just call |link.click()|, because it needs to pretend that the navigation comes with a user gesture (the navigation will open in a new window because of target="_blank").

Comment 2 by kenrb@chromium.org, Jun 2 2016

I think the coordinates should be fine, but... are there examples of OOPIFs that receive input events at all in layout tests?

I think the problem is that WebViewImpl can only be used to pass input events to the main frame (which is something that will eventually be removed). Calling WebView::handleInputEvent with a remote main frame does nothing. I think EventSender would need to know the WebFrameWidget to target the events to instead.
Cc: alex...@chromium.org
Alex, had to deal with a similar problem for routing input events for plugin tests.  It seems that we could make test_runner::EventSender do something similar to what Alex is doing:

WebWidget* widget = frame->localRoot()->frameWidget();
...
widget->handleInputEvent(*event);

Comment 4 by kenrb@chromium.org, Jun 2 2016

Yes that sounds right.
I started working on a CL for making test_runner::EventRunner talk to the right widget, but hit 2 issues along the way and decided to just stash the CL for now (because it seems that this bug is well understood and AFAICT doesn't seem terribly important or blocking any launches).  The draft of the CL can be found at https://codereview.chromium.org/2036873002/ (see comments in the CL for details about the issues I've hit).
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8b3aa9314e3f33a6ed7740d78241e1b633595893

commit 8b3aa9314e3f33a6ed7740d78241e1b633595893
Author: lukasza <lukasza@chromium.org>
Date: Fri Jun 03 16:44:11 2016

Adding specific bugs for layout test failures with --site-per-process flag.

BUG= 615156 ,  616608 , 616626

Review-Url: https://codereview.chromium.org/2037743003
Cr-Commit-Position: refs/heads/master@{#397729}

[modify] https://crrev.com/8b3aa9314e3f33a6ed7740d78241e1b633595893/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process

Cc: lfg@chromium.org
Labels: -Pri-3 Pri-2
Owner: lukasza@chromium.org
Status: Started (was: Untriaged)
Summary: EventSender doesn't work with OOPIFs (e.g. test-generated mouse click is lost?) (was: http/tests/security/referrer-policy-redirect-link.html times out (test-generated mouse click is lost?))
Blocking: 644997
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d322c5ca6d26e98fcd737cede72c7e1243e7cea5

commit d322c5ca6d26e98fcd737cede72c7e1243e7cea5
Author: lukasza <lukasza@chromium.org>
Date: Fri Oct 07 00:32:34 2016

Making EventSender talk to the right WebWidget (for OOPIF support).

After the CL, there is a separate EventSender instance for each
WebWidgetTestProxyBase.  Additionally EventSender transforms the
coordinates of the event before calling Blink, to make sure the
coordinates will work with the target widget.

Supporting EventSender via WebWidgetTestProxyBase requires
exposing WebWidgetTestProxyBase::web_view_test_proxy_base()
accessor and this in turn allows for clean-ups in some other
places - for example this allows to remove storing borrowed
pointers to TestRunner and WebViewTestProxyBase inside
WebWidgetTestClient.

BUG= 616608 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2036873002
Cr-Commit-Position: refs/heads/master@{#423762}

[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/event_sender.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/event_sender.h
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_frame_test_client.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_test_delegate.h
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_test_interfaces.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_view_test_client.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_view_test_proxy.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_view_test_proxy.h
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_widget_test_client.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_widget_test_client.h
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_widget_test_proxy.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_widget_test_proxy.h
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/content/public/test/layouttest_support.h
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/content/shell/renderer/layout_test/blink_test_runner.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/content/shell/renderer/layout_test/blink_test_runner.h
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/content/test/BUILD.gn
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/content/test/layouttest_support.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/ui/events/blink/blink_event_util.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/ui/events/blink/blink_event_util.h

Status: Fixed (was: Started)
Project Member

Comment 11 by bugdroid1@chromium.org, Oct 27 2016

Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d322c5ca6d26e98fcd737cede72c7e1243e7cea5

commit d322c5ca6d26e98fcd737cede72c7e1243e7cea5
Author: lukasza <lukasza@chromium.org>
Date: Fri Oct 07 00:32:34 2016

Making EventSender talk to the right WebWidget (for OOPIF support).

After the CL, there is a separate EventSender instance for each
WebWidgetTestProxyBase.  Additionally EventSender transforms the
coordinates of the event before calling Blink, to make sure the
coordinates will work with the target widget.

Supporting EventSender via WebWidgetTestProxyBase requires
exposing WebWidgetTestProxyBase::web_view_test_proxy_base()
accessor and this in turn allows for clean-ups in some other
places - for example this allows to remove storing borrowed
pointers to TestRunner and WebViewTestProxyBase inside
WebWidgetTestClient.

BUG= 616608 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2036873002
Cr-Commit-Position: refs/heads/master@{#423762}

[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/event_sender.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/event_sender.h
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_frame_test_client.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_test_delegate.h
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_test_interfaces.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_view_test_client.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_view_test_proxy.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_view_test_proxy.h
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_widget_test_client.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_widget_test_client.h
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_widget_test_proxy.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/components/test_runner/web_widget_test_proxy.h
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/content/public/test/layouttest_support.h
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/content/shell/renderer/layout_test/blink_test_runner.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/content/shell/renderer/layout_test/blink_test_runner.h
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/content/test/BUILD.gn
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/content/test/layouttest_support.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/ui/events/blink/blink_event_util.cc
[modify] https://crrev.com/d322c5ca6d26e98fcd737cede72c7e1243e7cea5/ui/events/blink/blink_event_util.h

Comment 12 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840

Sign in to add a comment