start_desktop.js 663 B

12345678910111213141516
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. const flavor = __webDriverArguments[0]
  5. const url = __webDriverArguments[1]
  6. let wm = Cc["@mozilla.org/appshell/window-mediator;1"]
  7. .getService(Ci.nsIWindowMediator);
  8. let win = wm.getMostRecentWindow("navigator:browser");
  9. // mochikit's bootstrap.js has set up a listener for this event. It's
  10. // used so bootstrap.js knows which flavor and url to load.
  11. let ev = new CustomEvent('mochitest-load', {'detail': [flavor, url]});
  12. win.dispatchEvent(ev);