issue #3541 : Update test main functions of index.html and main.js. Add test cases for some modules

Update test main functions of index.html and main.js. Add test cases for some modules.