Skip to content

Instantly share code, notes, and snippets.

@Gozala
Created August 22, 2013 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gozala/6313036 to your computer and use it in GitHub Desktop.
Save Gozala/6313036 to your computer and use it in GitHub Desktop.
Test case for Bug 908318
let WW = Cc["@mozilla.org/appshell/window-mediator;1"].
getService(Ci.nsIWindowMediator);
let window = WW.getMostRecentWindow("browser")
let document = window.document;
let menu = document.querySelector("#menu_EditPopup");
let menuitem = document.createElement("menuitem");
let clone = document.querySelector("#menu_copy").cloneNode(true);
let fresh = document.createElement("menuitem");
fresh.setAttribute("label", "Test");
fresh.setAttribute("acceltext", "test");
menu.appendChild(fresh);
menu.appendChild(clone);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment