browser_customize.js
Go to the documentation of this file.
1 function test()
2 {
4  var frame = document.getElementById("customizeToolbarSheetIFrame");
5  frame.addEventListener("load", testCustomizeFrameLoadedPre, true);
6 
7  document.getElementById("cmd_CustomizeToolbars").doCommand();
8 }
9 
11  // This load listener can be called before
12  // customizeToolbarSheet.xul's, which would cause the test
13  // to fail. Use executeSoon to delay running the test until
14  // event dispatch is over (all load event listeners have run).
15  executeSoon(testCustomizeFrameLoaded);
16 }
17 
19 {
20  var panel = document.getElementById("customizeToolbarSheetPopup");
21  panel.addEventListener("popuphidden", testCustomizePopupHidden, false);
22 
23  var frame = document.getElementById("customizeToolbarSheetIFrame");
24  frame.removeEventListener("load", testCustomizeFrameLoadedPre, true);
25 
26  var menu = document.getElementById("bookmarksMenuPopup");
27  ok("getResult" in menu, "menu has binding");
28 
29  var framedoc = document.getElementById("customizeToolbarSheetIFrame").contentDocument;
30  var b = framedoc.getElementById("donebutton");
31 
32  b.focus();
33  framedoc.getElementById("donebutton").doCommand();
34 }
35 
37 {
38  var panel = document.getElementById("customizeToolbarSheetPopup");
39  panel.removeEventListener("popuphidden", testCustomizePopupHidden, false);
40  is(document.activeElement, document.documentElement, "focus after customize done");
41 
42  finish();
43 }
function testCustomizePopupHidden()
function test()
var menu
waitForExplicitFinish()
function testCustomizeFrameLoadedPre()
function testCustomizeFrameLoaded()