Bug 1058164 - Test that we get pageshow and pagehide events in content scripts when swapping frameloaders. r=smaug.

--HG--
extra : rebase_source : 41e6bf3145fd32358b736485b6b56bdced6d1e01
extra : histedit_source : fd7e7f0ba12393755d0111dee9fd1f9377f09623%2C0adc2c95bf5d1af2b413e9d69be6b73c986e8efd
Bug 1058164 - pageshow and pagehide events with the persisted property are not dispatched to content scripts when swapping frame loaders. r=smaug,felipe.

Frame scripts were not getting pageshow and pagehide events with the persisted
property during frameloader swapping due to the fact that the event target for
those events was set to be the chrome event handler. This patch makes the
event target be the nsInProcessTabChildGlobal instead, so frame scripts see
the events. This still needs to be fixed for the e10s case, but that will
have to wait until bug 918634 is fixed.

--HG--
extra : source : 738461f289977e9b7e975831a4755cda6f6ab49e
extra : histedit_source : 8255ca9aa900adf1216de8cf9f4ceec8e5c2a71c%2Cd20e41b1200bac5dab5bbdad8cc22293ec92dbea