jamesshore/lets_code_javascript — pull request #1 by gurdiga (2013-05-09 10:56:12+00:00)
Title: POC for iframe-based smoke tests

PREREQUISITES

Since Kali runs its own server we are not able to access the app in an
iframe due to the same origin policy. To get around this we have to put
both the application and the Kali test runner on subdomains of the same
second-level domain, for example app.weewikipaint.com and
tests.weewikipaint.com, and set document.domain = "weewikipaint.com" in
both of them.

Then, in src/client/_smoke_test.js, we inject an iframe in the Kali test
runner’s context and load the app in it. Then we get a handle to the app
and check things out.