[battery] Feedback on battery tests

Hi Anssi,

As per my action item (ACTION-585), I have taken a look to the tests you
submitted for the battery API. Some resulting feedback:
* I think battery-interface.html would be better tested using
idlharness.js https://dvcs.w3.org/hg/resources/file/tip/idlharness.js
(see attached test as replacement); that being said, it may be that your
manually crafted test is more complete, in which case it might be worth
contributing a generic version of your additional tests to
idlharness.js :)

* links to testharness.js should be not use an absolute URL
(http://www.w3c-test.org/resources/testharness.js) but rather the
relative URL h/resources/testharness.js (so that the test can be
integrated easily in other contexts)

* most of the tests require human interaction, which the tests should
denoted with a flag:     <meta name="flags" content="interact">

* when the timeout to run the test is long (e.g. in battery-charging, 5
minutes), that should probably be told to the tester (who is otherwise
likely to estimate that the test is stuck)

* using alert() to guide the user seems a bit inappropriate, and
possibly not very accessible; could the instructions/steps be instead
integrated in the main page?

Thanks for your great work on this!

Dom

Received on Monday, 19 November 2012 10:16:50 UTC