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 test() {
2 waitForExplicitFinish();
4 let tab = gBrowser.addTab("http://example.com");
5 gBrowser.selectedTab = tab;
7 onLoad(function () {
8 let originalValue = gURLBar.value;
10 gBrowser.userTypedValue = "foobar";
11 gBrowser.selectedTab = gBrowser.tabs[0];
12 gBrowser.selectedTab = tab;
13 is(gURLBar.value, "foobar", "location bar displays typed value");
15 gURLBar.focus();
16 EventUtils.synthesizeKey("VK_ESCAPE", {});
17 is(gURLBar.value, originalValue, "ESC reverted the location bar value");
19 gBrowser.removeTab(tab);
20 finish();
21 });
22 }
24 function onLoad(callback) {
25 gBrowser.selectedBrowser.addEventListener("pageshow", function loadListener() {
26 gBrowser.selectedBrowser.removeEventListener("pageshow", loadListener, false);
27 executeSoon(callback);
28 });
29 }