Skip to content

Instantly share code, notes, and snippets.

@annevk
Created July 26, 2017 09:40
Show Gist options
  • Save annevk/b15a0a9522d65c98b28fb8c6da9f0ae5 to your computer and use it in GitHub Desktop.
Save annevk/b15a0a9522d65c98b28fb8c6da9f0ae5 to your computer and use it in GitHub Desktop.
ECMAScript agent tests

ECMAScript has a concept of agents. Browsers support multiple agents (see the HTML Standard):

  • Similar-origin window agent
  • Dedicated worker agent
  • Shared worker agent
  • Service worker agent
  • Worklet agent (this might actually end up being several more, but is not really part of the scope for now as worklets haven't shipped yet)

TC39 maintains a test suite, but this is only run in a single browser agent I'm told, the similar-origin window agent. That means it's highly likely that SharedArrayBuffer objects are poorly tested. It also means that we don't know for sure that all features ECMAScript defines work in each agent. And while there's unlikely to be differences, it would be good to verify that assumption. Goals:

  1. Run the test suite in each of those agents
  2. Run the tests that require multiple agents (such as SharedArrayBuffer objects) in all possible combinations of the agents available (taking into account the [[CanBlock]] internal slot and such)
@annevk
Copy link
Author

annevk commented Jul 26, 2017

Stretch goal would be to take the ECMAScript module permutation into account as each of these agents also support a module variant (not entirely sure about worklets though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment