New issue
Advanced search Search tips
Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 24
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 802294



Sign in to add a comment

virtual/.../window-focus-self.html in webkit_layout_tests failing on chromium.webkit/WebKit Win10

Project Member Reported by sheriff-...@appspot.gserviceaccount.com, Jul 12

Issue description

Filed by sheriff-o-matic@appspot.gserviceaccount.com on behalf of kpaulhamus@chromium.org

virtual/.../window-focus-self.html in webkit_layout_tests failing on chromium.webkit/WebKit Win10

Builders failed on: 
- WebKit Win10: 
  https://ci.chromium.org/buildbot/chromium.webkit/WebKit%20Win10

Increasing flakiness (9 out of the last 24 runs). Failing with "FAIL: Window was focused"
 
Components: Blink>DOM Blink>HTML>Focus
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 12

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

commit a7be9cc2e39f872aeb8e03afb7d0aabf92ffde03
Author: Kim Paulhamus <kpaulhamus@chromium.org>
Date: Thu Jul 12 16:49:02 2018

Mark window-focus-self as flaky on Win10

Tbr: tkent@chromium.org
Bug:  863067 
Change-Id: I9f043eec8363dbb26ccaa8d901321e0d579f1a4f
Reviewed-on: https://chromium-review.googlesource.com/1135433
Commit-Queue: Kim Paulhamus <kpaulhamus@chromium.org>
Reviewed-by: Kim Paulhamus <kpaulhamus@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574600}
[modify] https://crrev.com/a7be9cc2e39f872aeb8e03afb7d0aabf92ffde03/third_party/WebKit/LayoutTests/TestExpectations

Labels: -Sheriff-Chromium
Cc: -dom-dev@chromium.org
Components: -Blink>DOM -Blink>HTML>Focus Blink>Input
Labels: Type-Bug
Status: Untriaged (was: Available)
Non-virtual version is very stable.  This is specific to user-activation-v2.

Owner: mustaq@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 13

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

commit 5427394bb739114e0a03c80594fcf4271fa461af
Author: Kim Paulhamus <kpaulhamus@chromium.org>
Date: Fri Jul 13 00:31:23 2018

Disabling the virtual window-focus-self test, not the non-virtual

Tbr: tkent@chromium.org
Bug:  863067 
Change-Id: I913685da055480d9cddea105808a16fd7e70facd
Reviewed-on: https://chromium-review.googlesource.com/1135982
Reviewed-by: Kim Paulhamus <kpaulhamus@chromium.org>
Commit-Queue: Kim Paulhamus <kpaulhamus@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574790}
[modify] https://crrev.com/5427394bb739114e0a03c80594fcf4271fa461af/third_party/WebKit/LayoutTests/TestExpectations

Blocking: 802294
Labels: UserActivation
kpaulhamus@: Wondering how to access the failure logs.  The link in #c1 doesn't seem to provide details unless I am missing something.

For records: the test has been flaky on Mac even w/o UAv2 enabled:  Issue 816766 .

Nm, found a log it: https://test-results.appspot.com/data/layout_results/WebKit_Win10/37746/layout-test-results/results.html

Looks like the windows gets "blur" and then "focus" events, while it expected only the first one.

We get the exact same outcome in mac ( Issue 816766 ):
https://test-results.appspot.com/data/layout_results/mac_chromium_rel_ng/659500/layout-test-results/results.html

Cc: dom-dev@chromium.org
Components: -Blink>Input Blink>HTML>Focus
Thanks for looking! I'll direct this towards the same component. Feel free to unassign yourself.
Owner: ----
Status: Available (was: Assigned)
Cc: kochi@chromium.org
Owner: kochi@chromium.org
Status: Assigned (was: Available)
kochi@, I remember you have recently investigated a similar issue. Could you triage?
Cc: -dom-dev@chromium.org
This seems to be a different problem than issue 859605, as the other issue
is about Element.focus(), while window.focus() runs completely different
code path.

window.focus() involves renderer<->browser IPC, so checking focus/blur event
on window against window.focus() can't be completely synchronous as opposed
to Element.focus().

The test in question relies on the event is dispatched (or not dispatched)
immediately using `setTimeout(, 0)`, which seems to me the source of flakiness.

>        window.open('javascript:window.focus()', '_self', '');
>        setTimeout(function() { testRunner.notifyDone(); }, 0);
Project Member

Comment 17 by bugdroid1@chromium.org, Jul 18

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

commit cea59c5edf0cf821af87ee665a9448d19a07f9df
Author: Christian Dullweber <dullweber@chromium.org>
Date: Wed Jul 18 14:03:45 2018

Disable window-focus-self.html on Windows

fast/dom/Window/window-focus-self.html is failing on Windows.

https://ci.chromium.org/buildbot/chromium.webkit/WebKit%20Win10/38018
https://ci.chromium.org/buildbot/chromium.webkit/WebKit%20Win10/38017

Tbr: kochi@chromium.org
Bug:  816766 ,  863067 
Change-Id: Ie54d5722b6c9c76d548d43a190ab827f051cdeb9
Reviewed-on: https://chromium-review.googlesource.com/1141869
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576029}
[modify] https://crrev.com/cea59c5edf0cf821af87ee665a9448d19a07f9df/third_party/WebKit/LayoutTests/TestExpectations

My analysis in comment 16 looks wrong.

The original intention of this test when it was introduced:
https://chromiumcodereview.appspot.com/14735005

checks opening a popup window against "_self" explicitly.
Probably the code was lost at some point - will investigate.
Cc: dom-dev@chromium.org
 Issue 816766  has been merged into this issue.
During initialization, the code to focus main frame (for delivering input events
etc.) sends IPC to focus, but the actual handling of this IPC could be
delayed after the test function is run, and occasionally "focus" event handler
is unexpectedly called for it, not the focus event originating from the script.

https://cs.chromium.org/chromium/src/content/browser/renderer_host/render_widget_host_impl.cc?l=1031&rcl=27d9265aae1ced02ca4e722a6585319010a0f5e9
is the place where the IPC is sent.

I'll make a change to the test to delay the execution of test function
after initial rendering.
Project Member

Comment 21 by bugdroid1@chromium.org, Jul 23

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

commit 44bc78241ecd613537c76e0df0c3a495ab01be01
Author: Takayoshi Kochi <kochi@chromium.org>
Date: Mon Jul 23 08:44:31 2018

Delay the test execution to avoid flakiness

The frame's initialization code focuses the content from browser
process via an IPC (browser->renderer), but its handling in the
renderer can be delayed until after the test code script execution
is started.

This caused the test to have a race condition, that a focus event
is delivered where it is not expected, and resulted the flakiness.
The test can fail on the initial use of content_shell process.

Delay the execution of test function so that it will not be
affected by the frame initial focus event.

Bug:  863067 
Change-Id: I475d912b0e9baffa3917212b2fc0735189381cb8
Reviewed-on: https://chromium-review.googlesource.com/1146523
Commit-Queue: Takayoshi Kochi <kochi@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577124}
[modify] https://crrev.com/44bc78241ecd613537c76e0df0c3a495ab01be01/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/44bc78241ecd613537c76e0df0c3a495ab01be01/third_party/WebKit/LayoutTests/fast/dom/Window/window-focus-self.html

Cc: -kpaulhamus@chromium.org

Sign in to add a comment