While writing tests for https://github.com/whatwg/html/issues/1129 I found that the target attribute is not used for javascript URLs in links.
*** Bug 178145 has been marked as a duplicate of this bug. ***
This is interesting but I guess there no tests for it?
See https://github.com/whatwg/html/issues/1129#issuecomment-318068941. Maybe it can be done through a popup? Where you follow the link in a popup and it actually targets a frame elsewhere. And then you observe if the popup or the frame changed.
(In reply to Anne van Kesteren from comment #3) > See https://github.com/whatwg/html/issues/1129#issuecomment-318068941. Maybe > it can be done through a popup? Where you follow the link in a popup and it > actually targets a frame elsewhere. And then you observe if the popup or the > frame changed. Thanks, based on that I created https://github.com/web-platform-tests/wpt/pull/24589.
Created attachment 404682 [details] Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Created attachment 416655 [details] Patch
The failing test is because javascript: handling is synchronous for the test. Also we do not support yet aborting of pending fetches on new navigations. I wonder how to proceed: - land this with the test marked as timeout, fix later. - fix javascript: handling first (https://bugs.webkit.org/show_bug.cgi?id=200523?), possibly aborting of pending fetches, which seems like a tricky change. - http://bugs.webkit.org/show_bug.cgi?id=16782 seems a bit related too. So I feel this patch is correct, it just show up some existing problems/areas where we do not match the specifications.
This came to my attention from EricLaw tweeting about this: https://twitter.com/ericlaw/status/1359173838257414151 It appears Chrome changed behaviour in 76, from https://bugs.chromium.org/p/chromium/issues/detail?id=944213. It sounds like they also had issues landing the change due to existing problems. https://wpt.fyi/results/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned&q=javascript-url-return-value-handling-dynamic.html shows the current results for the test Rob wrote.