michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: michael@0: let callCount = 0; michael@0: michael@0: newWindow(function (win) { michael@0: registerCleanupFunction(function () win.close()); michael@0: michael@0: win.TabView._initFrame(function () { michael@0: is(callCount++, 0, "call count is zero"); michael@0: ok(win.TabView.getContentWindow().UI, "content window is loaded"); michael@0: }); michael@0: michael@0: win.TabView._initFrame(function () { michael@0: is(callCount++, 1, "call count is one"); michael@0: ok(win.TabView.getContentWindow().UI, "content window is loaded"); michael@0: }); michael@0: michael@0: win.TabView._initFrame(function () { michael@0: is(callCount, 2, "call count is two"); michael@0: ok(win.TabView.getContentWindow().UI, "content window is loaded"); michael@0: finish(); michael@0: }); michael@0: }); michael@0: } michael@0: michael@0: function newWindow(callback) { michael@0: let opts = "chrome,all,dialog=no,height=800,width=800"; michael@0: let win = window.openDialog(getBrowserURL(), "_blank", opts, "about:blank"); michael@0: whenDelayedStartupFinished(win, () => callback(win)); michael@0: }