Fix form test failing on IE 10.

* Refactor form test and update to code style guidelines
* Tests now load in iframe when run from `test/index.html` on IE