Bug 1253538 - Window.open() should not reuse an existing window if it's running a different container - patch 3, r=me
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 07 Mar 2016 14:39:53 +0100
changeset 324964 7b9ef8accccea7ebd46406ff54e29f22f85f0f17
parent 324963 0c2cf128ceae933dd54fb078dbf69ee3c0f54cc7
child 324965 db12e253eb848d6644284f3ca034ae01e0ca4ed6
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 3, 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,17 +41,18 @@ 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) {
-    yield new content.window.wrappedJSObject.Promise(resolve => {
+    Cu.import("resource://gre/modules/PromiseUtils.jsm");
+    yield new 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");