Chrome Version: 70.0.3538.102
OS: Linux, Mac (likely happens on all OSes)
What steps will reproduce the problem?
(1) Navigate to https://jpchase.github.io/origintrials/cookiestore-validtoken.html
(2) Open the DevTools console
(3) Run the following code snippet: await cookieStore.get('cookie-name')
What is the expected result?
The DevTools console is initially empty, and running the script should result in the 'cookie-name' being displayed.
What happens instead?
The console has this error:
Uncaught (in promise) TypeError: Illegal invocation
at go (cookiestore-validtoken.html:6)
at cookiestore-validtoken.html:8
This only occurs when an origin trial token valid for the page and Cookie Store is provided. If there is no token, or the token is not valid for the page (e.g. a different origin), there is no illegal invocation error. For examples, try:
https://jpchase.github.io/origintrials/cookiestore-invalidtoken.html
https://jpchase.github.io/origintrials/cookiestore-notoken.html
The result on the other pages depends on the state of chrome://flags/#enable-experimental-web-platform-features.
When enabled, the cookie is created/read successfully (i.e. the expected result above). When disabled, the following error occurs (as expected):
Uncaught (in promise) ReferenceError: cookieStore is not defined
at go (cookiestore-invalidtoken.html:5)
at cookiestore-invalidtoken.html:7
Comment 1 by cha...@chromium.org
, Dec 14