I checked the following test and the test successfully passes *when* I allowed a popup window on the page.
https://w3c-test.org/client-hints/accept_ch.tentative.https.html
I guess that the test is failing just because it cannot open a new popup window. Event listener related things should have already been fixed as yukiy@ already completed their work.
For the tests, the test-only derived class would maintain an in-memory record of which origins opted-in to which subset of client hints, and for how long. Essentially, the test delegate is an in-memory substitute for the on-disk delegate:
https://cs.chromium.org/chromium/src/chrome/browser/client_hints/client_hints.cc?sq=package:chromium&g=0&l=218
The values for different client hints are currently decided by client_hints.cc which is in //chrome. For the test delegate, it's unclear if the values really matter since the purpose is to just check if ACL header is supported or not. However, if it's necessary, we would need to move the value-generation part to //content instead of //chrome.
Comment 1 by yukishiino@chromium.org
, Aug 20