This is the window.open version of bug 766481. STR: Gaia with this pull https://github.com/mozilla-b2g/gaia/pull/1853 and the last two buttons of window.open test. (naked window.open is not implemented in System app yet) Expected: - alert() show up with "Window: [object Window]" - attention screen pops up, or the background window show itself by issuing alert() (after ~1 sec) Actual: - alert() "Window: null" and nothing else.
I see what's going on here; another stupid bug.
Created attachment 635367 [details] [diff] [review] Patch, v1
Created attachment 635369 [details] [diff] [review] Tests, v1
This depends on bug 766481 because the tests use alert() from <iframe> inside <iframe mozbrowser>, which won't work without bug 766481 fixed.
Comment on attachment 635367 [details] [diff] [review] Patch, v1 r=me, I guess
Comment on attachment 635369 [details] [diff] [review] Tests, v1 r=me
By way of explanation, for posterity: <jlebar> bz, what's "I guess" for? :) <bz> I have no idea whether the code is actually correct. ;) <bz> e.g. I have no idea why looking at the .top matters <jlebar> bz, Oh. If we don't look at .top, we fire the mozbrowseropenwindow event on the inner <iframe>, not on the <iframe mozbrowser>. <jlebar> bz, It's not a problem OOP because we never see the <iframe>, only the outer <iframe mozbrowser>.
Naoki - Could you verify this fix when there's a gaia build containing this patch? Do we know when this patch (if not already) should be in an otoro build (new to the build process, so I don't know the full details of when mozilla central patches end up in an otoro build)?
Jason, please find me on IRC sometime and I'll help you figure out how to tell whether a build contains a given changeset.