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

HTML: target=_blank implies noopener; opener support #15188

Merged
merged 3 commits into from Feb 11, 2019

Conversation

annevk
Copy link
Member

@annevk annevk commented Jan 31, 2019

@annevk
Copy link
Member Author

annevk commented Jan 31, 2019

@foolip I don't know why Chrome is failing here.

@foolip
Copy link
Member

foolip commented Feb 1, 2019

From the logs:

All results

/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html

Subtest Results Messages
TIMEOUT
Anchor element with target=_blank with rel=noopener PASS: 1/10, TIMEOUT: 9/10 Test timed out
Anchor element with target=_blank with rel=opener PASS
Anchor element with target=_blank with implicit rel=noopener FAIL assert_equals: expected false but got true
Anchor element with target=_blank with rel=opener+noopener PASS: 1/10, TIMEOUT: 9/10 Test timed out
Anchor element with target=_blank with rel=noopener+opener TIMEOUT Test timed out
Area element with target=_blank with rel=noopener TIMEOUT Test timed out
Area element with target=_blank with rel=opener PASS
Area element with target=_blank with implicit rel=noopener FAIL assert_equals: expected false but got true
Area element with target=_blank with rel=opener+noopener PASS: 2/10, TIMEOUT: 8/10 Test timed out
Area element with target=_blank with rel=noopener+opener PASS: 1/10, TIMEOUT: 9/10 Test timed out

/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base.html

Subtest Results Messages
TIMEOUT
Anchor element with target=_blank with rel=noopener PASS: 2/10, TIMEOUT: 8/10 Test timed out
Anchor element with target=_blank with rel=opener PASS
Anchor element with target=_blank with implicit rel=noopener FAIL assert_equals: expected false but got true
Anchor element with target=_blank with rel=opener+noopener TIMEOUT Test timed out
Anchor element with target=_blank with rel=noopener+opener TIMEOUT Test timed out
Area element with target=_blank with rel=noopener TIMEOUT Test timed out
Area element with target=_blank with rel=opener PASS
Area element with target=_blank with implicit rel=noopener FAIL assert_equals: expected false but got true
Area element with target=_blank with rel=opener+noopener PASS: 1/10, TIMEOUT: 9/10 Test timed out
Area element with target=_blank with rel=noopener+opener PASS: 3/10, TIMEOUT: 7/10 Test timed out

Unstable results

Test Subtest Results Messages
/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html Anchor element with target=_blank with rel=noopener PASS: 1/10, TIMEOUT: 9/10 Test timed out
/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html Anchor element with target=_blank with rel=opener+noopener PASS: 1/10, TIMEOUT: 9/10 Test timed out
/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html Area element with target=_blank with rel=opener+noopener PASS: 2/10, TIMEOUT: 8/10 Test timed out
/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html Area element with target=_blank with rel=noopener+opener PASS: 1/10, TIMEOUT: 9/10 Test timed out
/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base.html Anchor element with target=_blank with rel=noopener PASS: 2/10, TIMEOUT: 8/10 Test timed out
/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base.html Area element with target=_blank with rel=opener+noopener PASS: 1/10, TIMEOUT: 9/10 Test timed out
/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base.html Area element with target=_blank with rel=noopener+opener PASS: 3/10, TIMEOUT: 7/10 Test timed out

What is the runtime of the test, might it be close to timing out?

@annevk
Copy link
Member Author

annevk commented Feb 1, 2019

It's opening a bunch of windows and reporting results via BroadcastChannel. Should be relatively quick, but might depend on other things?

@foolip
Copy link
Member

foolip commented Feb 1, 2019

I was able to reproduce the failure with ./wpt run --verify --channel dev --binary which google-chrome-unstable --log-tbpl - chrome /html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html.

I didn't time it, but each iteration seemed to take ~10s, and here's the output:

All results

/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html

Subtest Results Messages
TIMEOUT
Anchor element with target=_blank with rel=noopener PASS: 2/10, TIMEOUT: 8/10 Test timed out
Anchor element with target=_blank with rel=opener PASS
Anchor element with target=_blank with implicit rel=noopener FAIL assert_equals: expected false but got true
Anchor element with target=_blank with rel=opener+noopener PASS: 5/10, TIMEOUT: 5/10 Test timed out
Anchor element with target=_blank with rel=noopener+opener PASS: 7/10, TIMEOUT: 3/10 Test timed out
Area element with target=_blank with rel=noopener TIMEOUT Test timed out
Area element with target=_blank with rel=opener PASS
Area element with target=_blank with implicit rel=noopener FAIL assert_equals: expected false but got true
Area element with target=_blank with rel=opener+noopener PASS: 9/10, TIMEOUT: 1/10 Test timed out
Area element with target=_blank with rel=noopener+opener PASS: 6/10, TIMEOUT: 4/10 Test timed out

Unstable results

Test Subtest Results Messages
/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html Anchor element with target=_blank with rel=noopener PASS: 2/10, TIMEOUT: 8/10 Test timed out
/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html Anchor element with target=_blank with rel=opener+noopener PASS: 5/10, TIMEOUT: 5/10 Test timed out
/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html Anchor element with target=_blank with rel=noopener+opener PASS: 7/10, TIMEOUT: 3/10 Test timed out
/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html Area element with target=_blank with rel=opener+noopener PASS: 9/10, TIMEOUT: 1/10 Test timed out
/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html Area element with target=_blank with rel=noopener+opener PASS: 6/10, TIMEOUT: 4/10 Test timed out

Does the test run quickly on Firefox?

@annevk
Copy link
Member Author

annevk commented Feb 1, 2019

It does. It shouldn't run any longer than the per-test timeout though.

@foolip
Copy link
Member

foolip commented Feb 1, 2019

I guess that one could only start trying to reproduce and minify until the cause is clear. Not sure who a good contact working on Chromium would be. @tkent-google, do you know who's are this is?

@tkent-google
Copy link
Contributor

@tkent-google, do you know who's are this is?

If it's a BroadcastChannel issue, renderer/modules/broadcastchannel/OWNERS is the contact. If it's a window managing issue, no one is responsible and HTML team can be a fallback.

Anyway, I have a comment on the test.

@annevk
Copy link
Member Author

annevk commented Feb 4, 2019

Should be all good now, from a test perspective. Dunno about Taskcluster though.

@foolip
Copy link
Member

foolip commented Feb 4, 2019

I'll go ahead and admin merge this. If it's also flaky in Chromium (content_shell) it'll be easier to diagnose there.

@foolip
Copy link
Member

foolip commented Feb 4, 2019

Uh, actually, whatwg/html#4330 is open. @annevk let me know when I should merge this.

@annevk
Copy link
Member Author

annevk commented Feb 7, 2019

This can now be merged. I'll be merging the HTML PR shortly. A Chromium bug is already filed as per that PR.

For squash and merge please only use the commit message from the initial commit.

@annevk annevk assigned foolip and unassigned jdm Feb 7, 2019
annevk added a commit to whatwg/html that referenced this pull request Feb 7, 2019
This reduces the number of coupled top-level browsing contexts and thereby reduces the attack surface somewhat.

Tests: web-platform-tests/wpt#15188.

Fixes #4078.
@foolip foolip merged commit e81ca20 into master Feb 11, 2019
@foolip foolip deleted the annevk/target-blank-no-opener branch February 11, 2019 13:33
@foolip
Copy link
Member

foolip commented Feb 11, 2019

@annevk squash merged!

@annevk
Copy link
Member Author

annevk commented Feb 11, 2019

Takk!

mustaqahmed pushed a commit to mustaqahmed/html that referenced this pull request Feb 15, 2019
This reduces the number of coupled top-level browsing contexts and thereby reduces the attack surface somewhat.

Tests: web-platform-tests/wpt#15188.

Fixes whatwg#4078.
mustaqahmed pushed a commit to mustaqahmed/html that referenced this pull request Feb 15, 2019
This reduces the number of coupled top-level browsing contexts and thereby reduces the attack surface somewhat.

Tests: web-platform-tests/wpt#15188.

Fixes whatwg#4078.
@ericlaw1979
Copy link
Contributor

ericlaw1979 commented May 25, 2019

The test case does:

<img src="" /> <area /> </img>

Is that valid? (It doesn't seem to create an image map, and there's a /> that ends the image tag then an explicit </img> at the end.

@zcorpan
Copy link
Member

zcorpan commented May 26, 2019

</img> is invalid HTML. The association needs to be done with <img usemap=#foo><map name=foo>

@annevk
Copy link
Member Author

annevk commented May 27, 2019

It's indeed bogus, but shouldn't affect the test. I'll create a PR to clean that up a bit though.

annevk added a commit that referenced this pull request May 27, 2019
As pointed out in #15188 (comment) it was a bit confusing (and wrong).
foolip pushed a commit that referenced this pull request May 27, 2019
As pointed out in #15188 (comment) it was a bit confusing (and wrong).
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jun 19, 2019
…ener tests, a=testonly

Automatic update from web-platform-tests
Editorial: cleanup some area opener/noopener tests (#17025)

As pointed out in web-platform-tests/wpt#15188 (comment) it was a bit confusing (and wrong).
--

wp5At-commits: 36f2a92acd0f8214dfcddfffd970f73c30efd5bf
wpt-pr: 17025
xeonchen pushed a commit to xeonchen/gecko that referenced this pull request Jun 19, 2019
…ener tests, a=testonly

Automatic update from web-platform-tests
Editorial: cleanup some area opener/noopener tests (#17025)

As pointed out in web-platform-tests/wpt#15188 (comment) it was a bit confusing (and wrong).
--

wp5At-commits: 36f2a92acd0f8214dfcddfffd970f73c30efd5bf
wpt-pr: 17025
marcoscaceres pushed a commit that referenced this pull request Jul 23, 2019
As pointed out in #15188 (comment) it was a bit confusing (and wrong).
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 4, 2019
…ener tests, a=testonly

Automatic update from web-platform-tests
Editorial: cleanup some area opener/noopener tests (#17025)

As pointed out in web-platform-tests/wpt#15188 (comment) it was a bit confusing (and wrong).
--

wp5At-commits: 36f2a92acd0f8214dfcddfffd970f73c30efd5bf
wpt-pr: 17025

UltraBlame original commit: b17abf34f8216da67984b02fd15a79f412aa5a9e
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 4, 2019
…ener tests, a=testonly

Automatic update from web-platform-tests
Editorial: cleanup some area opener/noopener tests (#17025)

As pointed out in web-platform-tests/wpt#15188 (comment) it was a bit confusing (and wrong).
--

wp5At-commits: 36f2a92acd0f8214dfcddfffd970f73c30efd5bf
wpt-pr: 17025

UltraBlame original commit: b17abf34f8216da67984b02fd15a79f412aa5a9e
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 4, 2019
…ener tests, a=testonly

Automatic update from web-platform-tests
Editorial: cleanup some area opener/noopener tests (#17025)

As pointed out in web-platform-tests/wpt#15188 (comment) it was a bit confusing (and wrong).
--

wp5At-commits: 36f2a92acd0f8214dfcddfffd970f73c30efd5bf
wpt-pr: 17025

UltraBlame original commit: b17abf34f8216da67984b02fd15a79f412aa5a9e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants