Testing vendor-prefixed features

Hi,

I brought up the other day on IRC the need for a few specs to have tests
that can be run on vendor-prefixed versions of the APIs.

While the number of such specs will hopefully no longer grow, and even
soon decline, it remains that for these specs, sticking to the "no
vendor prefix" rule set in the test review checklist [1] will make it
much less likely that WGs (or external contributors for that matter)
will develop or review test cases.

James suggested that provided the vendor-prefixing can be well isolated,
made optional, and not the default behavior, a script that would
facilitate vendor-prefixed features testing might be acceptable. He
suggested using a "usePrefixes=1" parameter in the query string to
switch to testing with vendor prefixes.

I have thus developed such a script that would let develop tests with
vendor prefixes:
https://github.com/w3c/web-platform-tests/pull/633

It follows the "usePrefixes=1" convention described above, documents
which features get effectively prefixed, and it uses a declarative
approach to define which features can be prefixed in the first place to
try and keep the test code as clean as possible.

There are a number of existing test cases that use vendor prefixes in
the repository at the moment [2]; once we have a workable solution in
place, we should file issues on these and/or fix them.

I would welcome feedback on this proposal. I'm absolutely not married to
the particular approach of my script; I'm mostly interested in having
something my groups can rely on.

Dom

1. http://testthewebforward.org/docs/review-checklist.html
2. find . -type f -name "*.js"|xargs grep -l webkit[^.]
# edited for false positives
../selectors-api/tests/submissions/Opera/level2-lib.js
../vibration/support/feature-detection.js
../IndexedDB/idbworker.js
../IndexedDB/support.js
../IndexedDB/submissions/Opera/support.js
../IndexedDB/submissions/Opera/Microsoft-port/idbworker.js
../mediacapture-streams/featuredetection.js
../shadow-dom/testcommon.js
../webaudio/js/vendor-prefixes.js
../webaudio/js/buffer-loader.js
find . -type f -name "*.html"|xargs grep -l webkit[^.]
# edited for false positives
../FileAPI/historical.html
../webdriver/element_state/element-moved-outside-viewport-by-transform.html
../webdriver/element_state/element-moved-behind-other-element-by-transform.html
../html/editing/dnd/draggable-areas/transform.html
../html/editing/dnd/overlay/heavy-styling-007.html
../html/syntax/parsing/html5lib_scripted_webkit01.html
../html/syntax/parsing/html5lib_webkit02.html
../html/syntax/parsing/html5lib_webkit01.html
../webrtc/simplecall.html
../shadow-dom/shadow-trees/custom-pseudo-elements/test-001.html
../shadow-dom/shadow-trees/text-decoration-001.html
../webaudio/the-audio-api/the-gainnode-interface/test.html
../webaudio/specification.html

Received on Friday, 14 February 2014 09:30:36 UTC