web-platform-tests / wpt

Test suites for Web platform specs — including WHATWG, W3C, and others
https://web-platform-tests.org/
Other
5k stars 3.1k forks source link

referrerPolicy is not set to be relevant mutation, setting referrerPolicy after setting src takes no effect #2882

Open tungnh28 opened 8 years ago

tungnh28 commented 8 years ago

Reference: https://github.com/w3c/webappsec-referrer-policy/pull/35 @annevk @estark37 Because referrerPolicy is not treated as relevant mutations (like crossOrigin), setting the attribute will not trigger reloading/updating image data, in other words, will not change policy/referrer of loading channel (whether it has previously completed or not). I think we should set img.src after setting img.referrerPolicy

tungnh28 commented 8 years ago

https://github.com/tungmangtdh3/web-platform-tests/commit/1a3326820309bea0361fa2af34bd668dd8fe17b6

jeisinger commented 8 years ago

I don't think whether or not this is a relevant mutation matters here, but the patch looks correct anyways.

jdm commented 8 years ago

https://github.com/w3c/webappsec-referrer-policy/pull/35#issuecomment-213375044 is interesting, because it means that this patch is working around an implementation detail in Firefox (ie. we're not implementing the specification as written). Do other browsers pass the test as originally written?