Fixed javascript mimetype test