Fixed syntax errors in tests.js.

JavaScript is so terrible that Chrome eat this code good, but another
browser fail.