Add autotests for JS extensions.

Change-Id: I94791a9c5bf46f7b59fdc6e692cd79492e63ba96
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>