Submitting tests to the caniuse test suite

The caniuse test suite provides a quick way of assessing basic support for various web technology features. The tests range from automatic to visual and interactive. For those interested in submitting tests for current or new features, this page explains what is required.

These are the four different types of feature tests and what to submit:

1. Automatic

A JavaScript test that results in either true or false. Can be either a simple check like '"Blob" in window' or something more elaborate. A number of auto tests come from Modernizr.

To submit:

Provide JavaScript code that results in calling setResult(true) if the test passed.

2. Visual square

An HTML test that, when passed, results in a 30px by 30px lime-colored square. How this is achieved varies significantly among features. Many CSS tests use this kind of test, often by using overflow: hidden on a parent element to make sure the effect results in only the visible square appearing.

To submit:

Provide HTML/CSS that creates the square that passes the test. Note that the HTML will be automatically inserted in a div with the following style:

background: red;
border: 1px solid black;
display: inline-block;
height: 30px;
width: 30px;

3. Visual comparison

If the feature does not easily lend itself to a visual square test, a visual comparison test can be used instead. This is also an HTML test that requires a reference image to be included that will be displayed next to given HTML content. Often these will never be 100% exact matches, but the difference between passing and failing should be pretty clear.

To submit:

Provide a small reference image (likely a screen capture from a correctly supporting browser) and the HTML that should match it. Optionally include a note on how it should appear.

4. Interactive

Another type of HTML test that requires a minimal kind of interaction to see if the feature is supported as expected. May also be a link to another site with an interaction test.

To submit:

Provide the HTML with a minimal interaction test (press a button, etc). Include a short note on the action required and expected outcome.

Sending the test(s)

Send your test to when (at) and after reviewing I will get back with any questions, comments, etc. if necessary. If all looks good, it will be added to the test suite.