Similarly to how we handle stdio, this captures all protocol messages and logs them when a test fails. Great for when debugging tests in parallel or for bot failures!
Currently I made `DEBUGP=true` turn this on locally, and turned it on always for the CI. Open to
suggestions for a better environment variable. I would turn it on by default always, like the stdio logging, but it adds an enormous amount of noise to our error messages.
I enabled vscode autocomplete in our test files. Typechecking had too many errors to enable, but it caught some real bugs that I will fix in a follow up.
This patch contains:
* `test/types.d.ts` - d.ts file for our test runner.
* `test/tsconfig.json` - typescript project for our tests.
* JSDoc header in all specs to mark the describe as a TestSuite
* Drive-by fix of a launcher test that was using `if` instead of `it`
* Some drive-by fixes of unimpactful typos in tests.
This list contains all of the default keyboard shortcuts for macos, and the Objective-C selector that they trigger on the [NSStandardKeyBindingResponding](https://developer.apple.com/documentation/appkit/nsstandardkeybindingresponding/3005237-moveleft?language=objc). We need these for basic keyboard functionality like ArrowUp and ArrowDown to work on WebKit for mac. For other browsers on mac, the same list can be used to enable better mac keyboard emulation.
The list was made by constructing NSEvents on a mac and seeing what selectors they triggered on an NSTextView. The conversion from NSEvents to DOM codes was done partially by hand as the code that does this conversion lives across many files in WebKit. There may be some errors or missing commands, but in general this should be a more faithful mac keyboard emulation than what we do in Chromium currently.
Notably absent from the list are Cut, Copy, Paste, Paste Special, Undo, and Redo. They are handled in a slightly different way.