2008-09-09 06:43:10 -07:00
|
|
|
var listener = {
|
|
|
|
handleEvent : function(e) {
|
|
|
|
if (e.target == theBrowser.contentDocument)
|
|
|
|
doTest();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var theTab;
|
|
|
|
var theBrowser;
|
|
|
|
|
|
|
|
function test() {
|
|
|
|
waitForExplicitFinish();
|
|
|
|
|
|
|
|
theTab = gBrowser.addTab();
|
|
|
|
theBrowser = gBrowser.getBrowserForTab(theTab);
|
|
|
|
theBrowser.addEventListener("load", listener, true);
|
2010-09-10 10:20:38 -07:00
|
|
|
|
|
|
|
var rootDir = getRootDirectory(gTestPath);
|
|
|
|
theBrowser.contentWindow.location = rootDir + "bug453896_iframe.html";
|
2008-09-09 06:43:10 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
function doTest() {
|
2008-09-10 17:07:52 -07:00
|
|
|
theBrowser.removeEventListener("load", listener, true);
|
2008-09-09 06:43:10 -07:00
|
|
|
var fake_window = { ok: ok, SimpleTest: { finish: finish } };
|
|
|
|
theBrowser.contentWindow.wrappedJSObject.run(fake_window);
|
|
|
|
gBrowser.removeTab(theTab);
|
|
|
|
}
|