BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Testing a Browser’s JavaScript Compatibility with Test 262

Testing a Browser’s JavaScript Compatibility with Test 262

This item in japanese

The recently released ECMAScript 262 5.1 fixes bugs in the previous major version 5.0, and is accompanied by Test 262, an online JavaScript compatibility test suite.

Ecma International, the non-profit standards organization involved in the standardization of JavaScript (Netscape) and JScript (Microsoft), has announced ECMA-262 version 5.1, an edition of the standard meant to fix some bugs and editorial mistakes introduced in ECMA 5.0 and published in December 2009 in order to bring more consistency among browsers. For a complete list of technically significant corrections and clarifications in the 5.1 Edition the reader is invited to read Annex F of the standard (PDF).

The most important addition to this edition of the standard is an ECMA test suite comprising over 10,000 tests meant to verify how various browsers support the language. Any developer can perform the test at http://test262.ecmascript.org. Both Microsoft and Google contributed each with over 5,000 tests from IE Testing Center and Sputnik, respectively, and the list is open, the standards body promising to publish it as an Ecma Technical Report in December with later updates.

Microsoft was quick to run a test against all major browsers, showing that IE 10 PPB2  passes 99% of the tests, closely followed by Firefox 5 and Chrome, but Opera being still way behind in implementing JavaScript according to the standard passing only 65% of the tests:

image

It is expected that major browsers will pass all tests or nearly all of them in the near future, except for Opera which needs to play some catch up.

It is noteworthy that all major browser companies are coming together to have mutually agreed HTML5 and ECMAScript standards, which is very needed for a unified web experience from the user’s perspective, the competition moving towards services provided and ecosystems created around them. That is a clear separation from the past, at least from this perspective, when Microsoft and Netscape fought bitterly to dominate the web experience by providing browsers that were incompatible with each other in many ways.

Rate this Article

Adoption
Style

BT