There are a few different categories of layout tests.
We have js-tests, which are Chrome only.
We have testharness.js tests, which are Chrome only.
We have web-platform-tests, which use testharness.js, don't use any Chrome specific features, and have been upstreamed to the w3c repo.
Ideally all of our tests would be web-platform-tests. If we have adequate web-platform-test coverage, we don't need any other tests. In some cases, where we've got a test to make sure we don't have some implementation specific quirk, we might want a few testharness.js tests which aren't upstreamed, as they wouldn't make sense for other browsers.
My recommendation for the moment would be to write testharness.js tests, using the gpu benchmarking extension.
The gpu benchmarking extension isn't used in layout tests currently, but when we get webdriver support, input will be synthesized approximately the same way in webdriver as it is in the gpu benchmarking extension.
For
gpu benchmarking, run with the --enable-
gpu-
benchmarking flag - we should probably always run layout tests with this flag for now.
Then chrome.gpuBenchmarking has a bunch of methods for simulating user input.
These methods are defined
here.