New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 872075 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
please use my google.com address
Closed: Aug 14
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 866708



Sign in to add a comment

WebClipboardImplTest failues with Mojo changes

Project Member Reported by roc...@chromium.org, Aug 8

Issue description

The failing tests are (in content_browsertests):

  WebClipboardImplTest.ImageCopy
  WebClipboardImplTest.PasteRTF

See blocked bug for details and motivation regarding what's changing in Mojo. Likely the failures are caused by incorrect task ordering assumptions.
 
Cc: jsb...@chromium.org
Labels: -Pri-3 Pri-1
+jsbell who has at least touched one of these tests recently. The original author appears to have left the Chrome team and I don't see any obvious owners here.

Any chance you have background and/or cycles to help look into this?

I notice both tests are marked flaky already anyway, and I would bet that the flakiness without my patch[1] is in fact caused by the same incorrect ordering assumptions (wherever they are) that consistently break the tests when my patch is applied.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1145692
Not a lot of background or cycles, unfortunately. The structure I used for the ImageCopy test was cargo-culted from the other test, and there was subtlety getting it to not be flaky across platforms (specifically Windows) but IIRC was solid when I landed it which points at later refactors...

When working on the ImageCopy test I narrowed down the raciness by more subtle logging, e.g. checking if the execCommand() actually succeeded. Since both tests are flaking, and it looks like they're timing out, the common bit might be the FrameFocusedObserver - raciness there?

Thanks for the additional insight! I'll dig into this.
Indeed it's an issue with FrameFocusedObserver. It's possible for focus to be observed before NavigateToURL returns, so there's no opportunity for FrameFocusedObserver to see the event. Hacking around for possible solutions.
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 14

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

commit b8a1c61da239baee11ebff6962a1667fab8d34fd
Author: Ken Rockot <rockot@chromium.org>
Date: Tue Aug 14 03:16:42 2018

De-flake WebClipboardImplTests

The issue was raciness between navigation and FrameFocusedObserver
setup. Focus can be dispatched to the FrameTreeNode before
NavigateToURL* returns, causing the subsequently constructed
FrameFocusedObserver to wait forever for an event that has already
happened.

Because FrameFocusedObserver only monitors the main frame's
FrameTreeNode, which is stable, we can construct the observer before
NavigateToURL*. That's what all this does.

Bug:  872075 , 867339 
Change-Id: I08c68ecb548163ee2097222d549e6985e5c9428a
Reviewed-on: https://chromium-review.googlesource.com/1173016
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582813}
[modify] https://crrev.com/b8a1c61da239baee11ebff6962a1667fab8d34fd/content/renderer/webclipboard_impl_browsertest.cc

Status: Fixed (was: Started)

Sign in to add a comment