Load polyfill in tests for Object.values() support in Fx45

This commit is contained in:
Dan Stillman 2017-05-08 18:45:57 -04:00
parent e1f09d4655
commit 12e70460dc
2 changed files with 2 additions and 3 deletions

View file

@ -1,3 +1,5 @@
Components.utils.import("resource://gre/modules/Services.jsm");
Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
Components.utils.import("resource://gre/modules/osfile.jsm");
var EventUtils = Components.utils.import("resource://zotero-unit/EventUtils.jsm");

View file

@ -81,7 +81,6 @@ var loadPrefPane = Zotero.Promise.coroutine(function* (paneName) {
*/
function waitForWindow(uri, callback) {
var deferred = Zotero.Promise.defer();
Components.utils.import("resource://gre/modules/Services.jsm");
var loadobserver = function(ev) {
ev.originalTarget.removeEventListener("load", loadobserver, false);
Zotero.debug("Window opened: " + ev.target.location.href);
@ -245,7 +244,6 @@ function waitForNotifierEvent(event, type) {
* Looks for windows with a specific URL.
*/
function getWindows(uri) {
Components.utils.import("resource://gre/modules/Services.jsm");
var enumerator = Services.wm.getEnumerator(null);
var wins = [];
while(enumerator.hasMoreElements()) {
@ -499,7 +497,6 @@ function uninstallPDFTools() {
* (i.e., test/tests/data)
*/
function getTestDataDirectory() {
Components.utils.import("resource://gre/modules/Services.jsm");
var resource = Services.io.getProtocolHandler("resource").
QueryInterface(Components.interfaces.nsIResProtocolHandler),
resURI = Services.io.newURI("resource://zotero-unit-tests/data", null, null);