Hi, everyone!
I'd like to discuss whether new layout tests that will not be upstreamed to web-platform-tests should be written using testharness.js or js-test.
Some context, in case it helps orient the discussion: I'm writing a test for a drag-and-drop bug, which covers both Web-exposed properties of drag-an-drop events and the drag feedback (a.k.a. ghost/preview), which is not Web-exposed. Because I'm testing drag-and-drop, the test uses eventSender, but it can also be used as a manual test on other browsers.
I think that my test, as well as all new layout tests, should by default use testharness.js. My reasons are:
* testharness is used in WPT, so I assume it will become the well-known testing toolkit among browser developers. If this assumption turns out true, testharness-based tests will be easier to read by an average browser developer than another test.
* testharness has well-maintained external documentation.
* testharness already enjoys special treatment in run-webkit-tests, so we don't need to commit text expectations if we expect all the tests to pass; this makes testharness-based tests more robust.
* testharness has reasonable APIs for expressing test expectations and grouping tests; this is not an advantage over js-test, but it's feature parity that I think is worth noting.
The main downside that I can see is that when a browser developer encounters the testharness inclusion tags, the developer may incorrectly assume that the test is intended to be upstreamed to WPT. I think this is a small cost given the benefits, and it can be mitigated by documentation.
This e-mail originates from the code review discussion at --
http://crrev.com/2477783002. Please read dpranke's comments there to get a full picture. I am not summarizing them to avoid ending up writing text that doesn't accurately represent the original comments.
Thank you very much in advance for your thoughts,
Victor