Bug 1253538 - Window.open() should not reuse an existing window if it's running a different container - patch 4, r=me
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 07 Mar 2016 15:06:16 +0100
changeset 324967 2f9b726495d18514f553bb64aea96f22f19ca15b
parent 324966 dd46a77cdf656048cce156d66fe0988e2e34ba84
child 324968 8807d361cda3b85c40a7faadb1f3dcee7711bae4
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1253538
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1253538 - Window.open() should not reuse an existing window if it's running a different container - patch 4, r=me
browser/components/contextualidentity/test/browser/browser_windowName.js
--- a/browser/components/contextualidentity/test/browser/browser_windowName.js
+++ b/browser/components/contextualidentity/test/browser/browser_windowName.js
@@ -41,21 +41,20 @@ add_task(function* test() {
   yield BrowserTestUtils.browserLoaded(browser2);
   yield ContentTask.spawn(browser2, null, function(opts) {
     content.window.name = 'tab-2';
   });
 
   // Let's try to open a window from tab1 with a name 'tab-2'.
   info("Opening a window from the first tab...");
   yield ContentTask.spawn(browser1, { url: BASE_URI + '?new' }, function(opts) {
-    Cu.import("resource://gre/modules/PromiseUtils.jsm");
-    yield new Promise(resolve => {
+    yield (new content.window.wrappedJSObject.Promise(resolve => {
       let w = content.window.wrappedJSObject.open(opts.url, 'tab-2');
       w.onload = function() { resolve(); }
-    });
+    }));
   });
 
   is(browser1.contentDocument.title, '?old', "Tab1 title must be 'old'");
   is(browser1.contentDocument.nodePrincipal.userContextId, 1, "Tab1 UCI must be 1");
 
   is(browser2.contentDocument.title, '?old', "Tab2 title must be 'old'");
   is(browser2.contentDocument.nodePrincipal.userContextId, 2, "Tab2 UCI must be 2");