Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky tests disabled due to Chrome runtime update #40214

Open
danielrozenberg opened this issue Jan 6, 2025 · 1 comment
Open

Fix flaky tests disabled due to Chrome runtime update #40214

danielrozenberg opened this issue Jan 6, 2025 · 1 comment

Comments

@danielrozenberg
Copy link
Member

The Chrome runtime update in #39912 seems to have introduced several new test flakes. Those tests were disabled in that PR, and should be fixed are reactivated

@danielrozenberg
Copy link
Member Author

Copying the comment I wrote in the PR:

Looks like there was a change in Chrome that breaks some of these tests. The breakage results from a difference here:

https://github.com/ampproject/amphtml/blob/main/extensions/amp-skimlinks/0.1/test/helpers.js#L13-L18

In Chrome 119, creating an <a> element inside the FakeWindow's Document, then setting its anchor.href to a schema-agnostic URL (e.g., anchor.href = '//a.com/';, ancho.href = 'a.com';) correctly changes the anchor.hostname field as well.

In Chrome 120, these URLs result in an empty string in anchor.hostname.

This issue only manifests itself inside the FakeWindow, it works as expected in a real window.

The one thing I noticed is that win.document.baseURI is set to http://localhost:6789/path/to/test/file.html in 119, and to about:blank in 120. I'm not sure if this is relevant, or how to continue this investigation

@erwinmombay you had additional context to add here about Chrome, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants