diff options
Diffstat (limited to 'netwerk/test/unit/client_cert_chooser.js')
-rw-r--r-- | netwerk/test/unit/client_cert_chooser.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/netwerk/test/unit/client_cert_chooser.js b/netwerk/test/unit/client_cert_chooser.js new file mode 100644 index 0000000000..5078c68fc6 --- /dev/null +++ b/netwerk/test/unit/client_cert_chooser.js @@ -0,0 +1,27 @@ +// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +"use strict"; + +const { ComponentUtils } = ChromeUtils.import( + "resource://gre/modules/ComponentUtils.jsm" +); + +var Prompter = { + QueryInterface: ChromeUtils.generateQI(["nsIPrompt"]), + alert() {}, // Do nothing when asked to show an alert +}; + +function WindowWatcherService() {} +WindowWatcherService.prototype = { + classID: Components.ID("{01ae923c-81bb-45db-b860-d423b0fc4fe1}"), + QueryInterface: ChromeUtils.generateQI(["nsIWindowWatcher"]), + + getNewPrompter() { + return Prompter; + }, +}; + +this.NSGetFactory = ComponentUtils.generateNSGetFactory([WindowWatcherService]); |