BT

Testing a Browser’s JavaScript Compatibility with Test 262

by Abel Avram on Jul 01, 2011 |

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.

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT