Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 function browserWindowsCount(expected) {
2 var count = 0;
3 var e = Services.wm.getEnumerator("navigator:browser");
4 while (e.hasMoreElements()) {
5 if (!e.getNext().closed)
6 ++count;
7 }
8 is(count, expected,
9 "number of open browser windows according to nsIWindowMediator");
10 is(JSON.parse(ss.getBrowserState()).windows.length, expected,
11 "number of open browser windows according to getBrowserState");
12 }
14 function test() {
15 waitForExplicitFinish();
17 browserWindowsCount(1);
19 var win = openDialog(location, "", "chrome,all,dialog=no");
20 win.addEventListener("load", function () {
21 win.removeEventListener("load", arguments.callee, false);
22 browserWindowsCount(2);
23 win.close();
24 browserWindowsCount(1);
25 finish();
26 }, false);
27 }