New issue
Advanced search Search tips

Issue 817049 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug

Blocking:
issue 735518



Sign in to add a comment

External web platform tests for persistent client hints

Project Member Reported by tbansal@chromium.org, Feb 27 2018

Issue description

This bug tracks the work to add external web platform tests for persistent client hints.
 
Labels: -Pri-3 M-67 Pri-1
The first of these tests is in https://chromium-review.googlesource.com/c/chromium/src/+/951867

Some thoughts about other bits that should be tested:
- Use of "equivalent HTML markup"
- What happens if the main frame document *doesn't* have a Accept-CH header but a response in an iframe does, and the iframe requests a resource. (I think it shouldn't work per spec?)
- That it doesn't work on non-secure contexts
- Parsing tests, to check that the value of the Accept-CH header is parsed per spec with regard to comma separation (that it's not a whitespace-separated list) 

The Accept-CH-Lifetime header itself seems kinda tricky to test. What I think you could do is to have the test first open a window from another domain which sends the Accept-CH header and a Accept-CH-Lifetime header with a long timeout. Then close the window, open it again, and check if the client hint headers were sent on the navigation request the second time.

http://web-platform-tests.org/writing-tests/server-features.html is documentation for how to do the cross-origin bits.
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aeee2631a5eebeda057baa20db3c236ed42ed41e

commit aeee2631a5eebeda057baa20db3c236ed42ed41e
Author: Tarun Bansal <tbansal@chromium.org>
Date: Tue Mar 13 04:14:56 2018

External WPT tests for Client hints

This CL includes the test for "Accept-CH" header.

If the origin includes "Accept-CH" in the response header,
then the browser should include the specified client hints
in the HTTP request headers for the resources contained
in that page.

Bug:  817049 
Change-Id: Id74193ab7a1cc3c4b03d66e080c43c64a6fcfbb2
Reviewed-on: https://chromium-review.googlesource.com/951867
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542724}
[add] https://crrev.com/aeee2631a5eebeda057baa20db3c236ed42ed41e/third_party/WebKit/LayoutTests/external/wpt/client-hints/OWNERS
[add] https://crrev.com/aeee2631a5eebeda057baa20db3c236ed42ed41e/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch.https.html
[add] https://crrev.com/aeee2631a5eebeda057baa20db3c236ed42ed41e/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch.https.html.headers
[add] https://crrev.com/aeee2631a5eebeda057baa20db3c236ed42ed41e/third_party/WebKit/LayoutTests/external/wpt/client-hints/echo_device_memory_header_received.py

Project Member

Comment 4 by bugdroid1@chromium.org, Mar 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/35687c943f14f9cdc4120c1c04ef433be6bd4d7f

commit 35687c943f14f9cdc4120c1c04ef433be6bd4d7f
Author: Tarun Bansal <tbansal@chromium.org>
Date: Thu Mar 15 17:48:31 2018

Test that client hints are not sent on insecure transports

Also, add tests for other client hints.

Finally. use the built-in sub pipe to enable running the
cross-origin test.

Bug:  817049 
Change-Id: Ib4155f50e0ffd3a0447cf250cd4018b650f3b419
Reviewed-on: https://chromium-review.googlesource.com/963403
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543433}
[add] https://crrev.com/35687c943f14f9cdc4120c1c04ef433be6bd4d7f/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch.http.html
[add] https://crrev.com/35687c943f14f9cdc4120c1c04ef433be6bd4d7f/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch.http.html.headers
[delete] https://crrev.com/28be690064531c3530648314e99e12a80f8c72c8/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch.https.html
[delete] https://crrev.com/28be690064531c3530648314e99e12a80f8c72c8/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch.https.html.headers
[add] https://crrev.com/35687c943f14f9cdc4120c1c04ef433be6bd4d7f/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch.sub.https.html
[add] https://crrev.com/35687c943f14f9cdc4120c1c04ef433be6bd4d7f/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch.sub.https.html.headers
[add] https://crrev.com/35687c943f14f9cdc4120c1c04ef433be6bd4d7f/third_party/WebKit/LayoutTests/external/wpt/client-hints/echo_client_hints_received.py
[delete] https://crrev.com/28be690064531c3530648314e99e12a80f8c72c8/third_party/WebKit/LayoutTests/external/wpt/client-hints/echo_device_memory_header_received.py

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c02f84adbad26c6af8794e4913bd5eb9459db730

commit c02f84adbad26c6af8794e4913bd5eb9459db730
Author: Tarun Bansal <tbansal@chromium.org>
Date: Mon Apr 09 19:12:30 2018

Add external WPT test for cross-origin requests

The browser should not attach client hints to the
requests fetched from cross origins.

Bug:  817049 
Change-Id: Ia7cedfbb6edaaf3616d6e2783965cc52f93c0cd9
Reviewed-on: https://chromium-review.googlesource.com/1000841
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549238}
[modify] https://crrev.com/c02f84adbad26c6af8794e4913bd5eb9459db730/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch.sub.https.html
[modify] https://crrev.com/c02f84adbad26c6af8794e4913bd5eb9459db730/third_party/WebKit/LayoutTests/external/wpt/client-hints/echo_client_hints_received.py

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 30 2018

Project Member

Comment 7 by bugdroid1@chromium.org, Jun 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/daebeb43ec9d1312594f1aab42f9b97a15596ccb

commit daebeb43ec9d1312594f1aab42f9b97a15596ccb
Author: Tarun Bansal <tbansal@chromium.org>
Date: Tue Jun 12 08:44:18 2018

Add web platform test for Accept-CH-Lifetime header for client hints

Bug:  817049 
Change-Id: Ic58e5688b0bb14803a9b6f01100500dd567b9fbc
Reviewed-on: https://chromium-review.googlesource.com/1066919
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566359}
[modify] https://crrev.com/daebeb43ec9d1312594f1aab42f9b97a15596ccb/third_party/WebKit/LayoutTests/W3CImportExpectations
[add] https://crrev.com/daebeb43ec9d1312594f1aab42f9b97a15596ccb/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch.tentative.https.html
[add] https://crrev.com/daebeb43ec9d1312594f1aab42f9b97a15596ccb/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch_lifetime.tentative.https.html
[add] https://crrev.com/daebeb43ec9d1312594f1aab42f9b97a15596ccb/third_party/WebKit/LayoutTests/external/wpt/client-hints/resources/accept_ch.html
[add] https://crrev.com/daebeb43ec9d1312594f1aab42f9b97a15596ccb/third_party/WebKit/LayoutTests/external/wpt/client-hints/resources/accept_ch.html.headers
[add] https://crrev.com/daebeb43ec9d1312594f1aab42f9b97a15596ccb/third_party/WebKit/LayoutTests/external/wpt/client-hints/resources/accept_ch_lifetime.html
[add] https://crrev.com/daebeb43ec9d1312594f1aab42f9b97a15596ccb/third_party/WebKit/LayoutTests/external/wpt/client-hints/resources/accept_ch_lifetime.html.headers
[add] https://crrev.com/daebeb43ec9d1312594f1aab42f9b97a15596ccb/third_party/WebKit/LayoutTests/external/wpt/client-hints/resources/do_not_expect_client_hints_headers.html
[add] https://crrev.com/daebeb43ec9d1312594f1aab42f9b97a15596ccb/third_party/WebKit/LayoutTests/external/wpt/client-hints/resources/expect_client_hints_headers.html

Status: Fixed (was: Started)

Sign in to add a comment