Once upon a time, Chromium had a bug in which the JS wrapper for the document in an inner frame was created using the prototype chain from the outer frame if the document was accessed from the outer frame first. Add a test to catch that.
Created attachment 28560 [details] New test + result
Comment on attachment 28560 [details] New test + result r=me I think that the test could be slightly cleaner if it used iframe onload attribute, rather than relying on some script run in the subframe. But maybe that wouldn't trigger the bug for some reason?
Hm... I'm not certain either. I'll go ahead and land this as it is for now, and ask the creator of the test to further improve it if he can. (It started out using timeouts and polling rather than cross-frame function calls.) Landed in r41668.