For Firefox, there is an add-on provides almost the function you wanted: https://addons.mozilla.org/en-US/firefox/addon/force-content-type/ . No idea if there is a Chrome extension or not.
Even if the functionality exists, I wouldn't recommend you to use it in your example: Arbitrary HTML would have access to google.com domain for cookie and script, which is really really bad in terms of security.