In
https://codereview.chromium.org/1841763002/diff/40001/chrome/browser/web_bluetooth_browsertest.cc
I have a test that calls into an experimental API to make sure I can
turn it off with the permission kill switch. Gio has asked that users
be able to re-enable it by turning on its flag, which makes sense, but
that's how I was enabling it in the test, so my test stops working. :)
In real life, the kill switch should affect folks in the Origin Trial,
so it'd be better for the test to visit a page that enables the API
through an origin trial.
I could ask for a token for a http://localhost:port origin, except
that the embedded_test_server picks its port dynamically, so no
hard-coded port will be guaranteed to work.
Do you folks have any example tests that opt into an origin trial?
(I'll have to wait to land this until we enable WebBluetooth on the
experimental framework, and only enable the test on platforms where we
enable the experiment, but that's straightforward enough.)
Thanks,
Jeffrey