Bug 1252738 - Stop using CPOWs in this test. r=felipc
authorBlake Kaplan <mrbkap@gmail.com>
Tue, 05 Apr 2016 18:58:00 +0200
changeset 291841 45b2a2adec04c7349f887f77dbaaefca986659fc
parent 291840 fabbda4a082a27cd6a9b04d8ab198b160b13871d
child 291842 fba631fb424cb3aba5e300f3d16ce8b2a05e0b89
push id74692
push usercbook@mozilla.com
push dateWed, 06 Apr 2016 07:06:16 +0000
treeherdermozilla-inbound@45b2a2adec04 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipc
bugs1252738
milestone48.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 1252738 - Stop using CPOWs in this test. r=felipc
dom/indexedDB/test/browser_permissionsPrompt.html
dom/indexedDB/test/browser_permissionsPromptDeny.js
--- a/dom/indexedDB/test/browser_permissionsPrompt.html
+++ b/dom/indexedDB/test/browser_permissionsPrompt.html
@@ -1,14 +1,15 @@
 <!--
   Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/
 -->
 <html>
   <head>
+    <meta charset=UTF-8>
     <title>Indexed Database Test</title>
 
     <script type="text/javascript;version=1.7">
       function testSteps()
       {
         const name = window.location.pathname;
 
         let request = indexedDB.open(name, { version: 1,
--- a/dom/indexedDB/test/browser_permissionsPromptDeny.js
+++ b/dom/indexedDB/test/browser_permissionsPromptDeny.js
@@ -15,24 +15,26 @@ function setUsePrivateBrowsing(browser, 
 
   return ContentTask.spawn(browser, val, function* (val) {
     docShell.QueryInterface(Ci.nsILoadContext).usePrivateBrowsing = val;
   });
 };
 
 
 function promiseMessage(aMessage) {
-  return new Promise(function(resolve, reject) {
-    content.addEventListener("message", function messageListener(event) {
-      content.removeEventListener("message", messageListener);
-      is(event.data, aMessage, "received " + aMessage);
-      if (event.data == aMessage)
-        resolve();
-      else
-        reject();
+  return ContentTask.spawn(gBrowser.selectedBrowser, aMessage, function* (aMessage) {
+    yield new Promise((resolve, reject) => {
+      content.addEventListener("message", function messageListener(event) {
+        content.removeEventListener("message", messageListener);
+        is(event.data, aMessage, "received " + aMessage);
+        if (event.data == aMessage)
+          resolve();
+        else
+          reject();
+      });
     });
   });
 }
 
 add_task(function test1() {
   removePermission(testPageURL, "indexedDB");
 
   info("creating tab");