Open Bug 1698093 Opened 5 years ago Updated 3 years ago

window.close() fails sporadically in WPT

Categories

(Testing :: web-platform-tests, defect, P3)

defect

Tracking

(Not tracked)

REOPENED

People

(Reporter: anton.sartori, Unassigned, NeedInfo)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36

Steps to reproduce:

This line https://github.com/web-platform-tests/wpt/blob/bfe96835f4fea985d014f4b9a55eb5a6f1cc104b/content-security-policy/inheritance/history.sub.html#L89
fails sporadically (although I can reproduce it quite often) on Firefox.

I will put it inside a try/catch for now.

Actual results:

The testharness part of the WPT fails.

Expected results:

It should not fail.

Is this an automated test that has failed? Is the browser code broken or the test harness?
I need some help providing an appropriate product and component for this bug. I've chosen the (Testing) web-platform-tests component. If incorrect, please provide a more appropriate one.

Also, I would like to confirm this issue. Can you provide some detailed steps to take in order to reproduce your issue? Is there some way to confirm it?

Component: Untriaged → web-platform-tests
Flags: needinfo?(anton.sartori)
Product: Firefox → Testing
Version: 78 Branch → unspecified

This is an automated test. However, the test is not failing at the moment since I put the failing window.close() inside a try/catch block (https://github.com/web-platform-tests/wpt/blob/81dc74e1dba979b9aa7ebdbeaad245e9a28f54ac/content-security-policy/inheritance/history.sub.html#L127)

In order to reproduce the issue:

  1. Clone the WPT repository https://github.com/web-platform-tests/wpt locally
  2. Replace this line https://github.com/web-platform-tests/wpt/blob/81dc74e1dba979b9aa7ebdbeaad245e9a28f54ac/content-security-policy/inheritance/history.sub.html#L127 with t.add_cleanup(popup.close);
  3. Run the test /content-security-policy/inheritance/history.sub.html locally (either by using ./wpt serve and opening the test in the browser, or by using the automated ./wpt run in a headless Firefox).
  4. You might have to run a few times, but eventually you will see the testharness fail because popup.close throws. It should not.

This does not seem to be a testharness issue nor an issue with the test. This works consistently on chrome (popup.close never throws). It looks to me like there could be a race with popup.close being called in parallel for several popups (the test creates 6 popups which are navigated back and forth).

I will confirm this issue based on the comment above. I expected some manual reproduction steps that I could try, but running the automated harness is a little out of my league. I choose to believe the reporter since he runs the tests.

Important to notice: As stated above, this issue is intermittent.

Status: UNCONFIRMED → NEW
Ever confirmed: true

A needinfo is requested from the reporter, however, the reporter is inactive on Bugzilla. Closing the bug as incomplete.

For more information, please visit auto_nag documentation.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE

The requested information was provided in comment 2.

Status: RESOLVED → REOPENED
Flags: needinfo?(anton.sartori)
Resolution: INCOMPLETE → ---

James, can you please try to reproduce this one using STRs in comment #2

Severity: -- → S3
Flags: needinfo?(james)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.