From 74944f6a581dea412b0e4ec9e338f6b7b2d9ae7c Mon Sep 17 00:00:00 2001 From: Joel Maher Date: Wed, 5 Nov 2014 09:47:00 -0500 Subject: [PATCH] Bug 1092587 - TypeError: Promise.defer is not a function, causing browser chrome failures. r=Yoric --- browser/base/content/test/chat/browser_chatwindow.js | 2 ++ browser/base/content/test/chat/browser_focus.js | 1 + browser/base/content/test/chat/browser_tearoff.js | 2 ++ .../loop/test/mochitest/browser_mozLoop_appVersionInfo.js | 2 ++ .../loop/test/mochitest/browser_mozLoop_doNotDisturb.js | 2 ++ .../loop/test/mochitest/browser_mozLoop_pluralStrings.js | 2 ++ .../components/loop/test/mochitest/browser_mozLoop_prefs.js | 2 ++ .../loop/test/mochitest/browser_mozLoop_telemetry.js | 1 + .../components/loop/test/mochitest/browser_toolbarbutton.js | 2 ++ .../test/browser/browser_privatebrowsing_urlbarfocus.js | 1 + browser/components/tabview/test/browser_tabview_bug608158.js | 2 ++ browser/components/tabview/test/browser_tabview_bug613541.js | 2 ++ browser/components/tabview/test/browser_tabview_bug624847.js | 2 ++ browser/components/tabview/test/browser_tabview_bug626455.js | 2 ++ browser/components/tabview/test/browser_tabview_bug633788.js | 2 ++ browser/components/tabview/test/browser_tabview_bug637840.js | 2 ++ browser/components/tabview/test/browser_tabview_bug685692.js | 2 ++ .../components/tabview/test/browser_tabview_pending_tabs.js | 1 + browser/extensions/pdfjs/test/browser_pdfjs_navigation.js | 3 +++ toolkit/mozapps/extensions/test/browser/browser_experiments.js | 2 ++ 20 files changed, 37 insertions(+) diff --git a/browser/base/content/test/chat/browser_chatwindow.js b/browser/base/content/test/chat/browser_chatwindow.js index 6916560e7ee9..861b5b16e143 100644 --- a/browser/base/content/test/chat/browser_chatwindow.js +++ b/browser/base/content/test/chat/browser_chatwindow.js @@ -2,6 +2,8 @@ * 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/. */ +Components.utils.import("resource://gre/modules/Promise.jsm", this); + let chatbar = document.getElementById("pinnedchats"); add_chat_task(function* testOpenCloseChat() { diff --git a/browser/base/content/test/chat/browser_focus.js b/browser/base/content/test/chat/browser_focus.js index 5df07ad11bf7..06118a7c8b69 100644 --- a/browser/base/content/test/chat/browser_focus.js +++ b/browser/base/content/test/chat/browser_focus.js @@ -4,6 +4,7 @@ // Tests the focus functionality. +Components.utils.import("resource://gre/modules/Promise.jsm", this); const CHAT_URL = "https://example.com/browser/browser/base/content/test/chat/chat.html"; // Is the currently opened tab focused? diff --git a/browser/base/content/test/chat/browser_tearoff.js b/browser/base/content/test/chat/browser_tearoff.js index d0ae78ccdaea..c23a53f34e6c 100644 --- a/browser/base/content/test/chat/browser_tearoff.js +++ b/browser/base/content/test/chat/browser_tearoff.js @@ -2,6 +2,8 @@ * 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/. */ +Components.utils.import("resource://gre/modules/Promise.jsm", this); + let chatbar = document.getElementById("pinnedchats"); function promiseNewWindowLoaded() { diff --git a/browser/components/loop/test/mochitest/browser_mozLoop_appVersionInfo.js b/browser/components/loop/test/mochitest/browser_mozLoop_appVersionInfo.js index 9b2a37a48d85..caa9b7879d17 100644 --- a/browser/components/loop/test/mochitest/browser_mozLoop_appVersionInfo.js +++ b/browser/components/loop/test/mochitest/browser_mozLoop_appVersionInfo.js @@ -6,6 +6,8 @@ * effects - rather than just testing MozLoopAPI alone. */ +Components.utils.import("resource://gre/modules/Promise.jsm", this); + add_task(loadLoopPanel); add_task(function* test_mozLoop_appVersionInfo() { diff --git a/browser/components/loop/test/mochitest/browser_mozLoop_doNotDisturb.js b/browser/components/loop/test/mochitest/browser_mozLoop_doNotDisturb.js index c618ecd91337..a167cc2ebb7b 100644 --- a/browser/components/loop/test/mochitest/browser_mozLoop_doNotDisturb.js +++ b/browser/components/loop/test/mochitest/browser_mozLoop_doNotDisturb.js @@ -6,6 +6,8 @@ * effects - rather than just testing MozLoopAPI alone. */ +Components.utils.import("resource://gre/modules/Promise.jsm", this); + add_task(loadLoopPanel); add_task(function* test_mozLoop_doNotDisturb() { diff --git a/browser/components/loop/test/mochitest/browser_mozLoop_pluralStrings.js b/browser/components/loop/test/mochitest/browser_mozLoop_pluralStrings.js index 4b6aabc9f52d..31aa61820621 100644 --- a/browser/components/loop/test/mochitest/browser_mozLoop_pluralStrings.js +++ b/browser/components/loop/test/mochitest/browser_mozLoop_pluralStrings.js @@ -6,6 +6,8 @@ * effects - rather than just testing MozLoopAPI alone. */ +Components.utils.import("resource://gre/modules/Promise.jsm", this); + add_task(loadLoopPanel); add_task(function* test_mozLoop_pluralStrings() { diff --git a/browser/components/loop/test/mochitest/browser_mozLoop_prefs.js b/browser/components/loop/test/mochitest/browser_mozLoop_prefs.js index a669d27cfccc..2c39619fb264 100644 --- a/browser/components/loop/test/mochitest/browser_mozLoop_prefs.js +++ b/browser/components/loop/test/mochitest/browser_mozLoop_prefs.js @@ -6,6 +6,8 @@ * effects - rather than just testing MozLoopAPI alone. */ +Components.utils.import("resource://gre/modules/Promise.jsm", this); + add_task(loadLoopPanel); add_task(function* test_mozLoop_charPref() { diff --git a/browser/components/loop/test/mochitest/browser_mozLoop_telemetry.js b/browser/components/loop/test/mochitest/browser_mozLoop_telemetry.js index e02e67470173..ce40a7aac164 100644 --- a/browser/components/loop/test/mochitest/browser_mozLoop_telemetry.js +++ b/browser/components/loop/test/mochitest/browser_mozLoop_telemetry.js @@ -4,6 +4,7 @@ /* * This file contains tests for the mozLoop telemetry API. */ +Components.utils.import("resource://gre/modules/Promise.jsm", this); add_task(loadLoopPanel); diff --git a/browser/components/loop/test/mochitest/browser_toolbarbutton.js b/browser/components/loop/test/mochitest/browser_toolbarbutton.js index a9fa912ba783..e4488f9071ee 100644 --- a/browser/components/loop/test/mochitest/browser_toolbarbutton.js +++ b/browser/components/loop/test/mochitest/browser_toolbarbutton.js @@ -7,6 +7,8 @@ "use strict"; +Components.utils.import("resource://gre/modules/Promise.jsm", this); + registerCleanupFunction(function*() { MozLoopService.doNotDisturb = false; MozLoopServiceInternal.fxAOAuthProfile = null; diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_urlbarfocus.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_urlbarfocus.js index 509a1a574c56..a1c22fb706b6 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_urlbarfocus.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_urlbarfocus.js @@ -5,6 +5,7 @@ // This test makes sure that the URL bar is focused when entering the private window. "use strict"; +Components.utils.import("resource://gre/modules/Promise.jsm", this); function checkUrlbarFocus(win) { let urlbar = win.gURLBar; diff --git a/browser/components/tabview/test/browser_tabview_bug608158.js b/browser/components/tabview/test/browser_tabview_bug608158.js index 8c7618b10207..ab2df172c765 100644 --- a/browser/components/tabview/test/browser_tabview_bug608158.js +++ b/browser/components/tabview/test/browser_tabview_bug608158.js @@ -1,6 +1,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +Components.utils.import("resource://gre/modules/Promise.jsm", this); + function test() { waitForExplicitFinish(); newWindowWithTabView(onTabViewWindowLoaded); diff --git a/browser/components/tabview/test/browser_tabview_bug613541.js b/browser/components/tabview/test/browser_tabview_bug613541.js index c218925e047c..81bc343e8d19 100644 --- a/browser/components/tabview/test/browser_tabview_bug613541.js +++ b/browser/components/tabview/test/browser_tabview_bug613541.js @@ -1,6 +1,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +Components.utils.import("resource://gre/modules/Promise.jsm", this); + function test() { let cw; let win; diff --git a/browser/components/tabview/test/browser_tabview_bug624847.js b/browser/components/tabview/test/browser_tabview_bug624847.js index 323dc4d81a83..685a132d6062 100644 --- a/browser/components/tabview/test/browser_tabview_bug624847.js +++ b/browser/components/tabview/test/browser_tabview_bug624847.js @@ -1,6 +1,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +Components.utils.import("resource://gre/modules/Promise.jsm", this); + function test() { let cw; let win; diff --git a/browser/components/tabview/test/browser_tabview_bug626455.js b/browser/components/tabview/test/browser_tabview_bug626455.js index d75d9a368d6f..bf7d86e9c1c3 100644 --- a/browser/components/tabview/test/browser_tabview_bug626455.js +++ b/browser/components/tabview/test/browser_tabview_bug626455.js @@ -15,6 +15,8 @@ const TEST_URL = 'data:text/html,