Add test for loading Javascript and Mime type.

Added tests cases for loading javascript using Ajax and also to check
that the Accept header is being set to the correct list of Javascript
Mime types.