Bug 1892041 - Part 3: Update test exclusions. r=spidermonkey-reviewers,dminor
[gecko.git] / testing / mochitest / start_desktop.js
blob93d59d935ba95230a8355114a2099a7d76204ab5
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/. */
5 // Defined by Marionette.
6 /* global __webDriverArguments */
7 const flavor = __webDriverArguments[0].flavor;
8 const url = __webDriverArguments[0].testUrl;
10 // eslint-disable-next-line mozilla/use-services
11 let wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(
12   Ci.nsIWindowMediator
14 let win = wm.getMostRecentWindow("navigator:browser");
15 if (!win) {
16   win = wm.getMostRecentWindow("mail:3pane");
19 // mochikit's bootstrap.js has set up a listener for this event. It's
20 // used so bootstrap.js knows which flavor and url to load.
21 let ev = new CustomEvent("mochitest-load", { detail: [flavor, url] });
22 win.dispatchEvent(ev);