Bug 783173 - Fix test_ipc implementations to handle mandatory __exposedProps__. r=khuey
authorBobby Holley <bobbyholley@gmail.com>
Fri, 17 Aug 2012 09:21:17 -0700
changeset 102658 a06b13aab674b5d08084f979d231fea2da494abf
parent 102657 37f9c2c2493185dca2c5354b79272e2dea14f6a6
child 102659 76a7b5eea991f929c85e7fb1c5d084b684a76cc4
push id23301
push userryanvm@gmail.com
push dateSat, 18 Aug 2012 02:17:26 +0000
treeherdermozilla-central@812ea773f166 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs783173
milestone17.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 783173 - Fix test_ipc implementations to handle mandatory __exposedProps__. r=khuey
dom/devicestorage/ipc/test_ipc.html
dom/indexedDB/ipc/test_ipc.html
--- a/dom/devicestorage/ipc/test_ipc.html
+++ b/dom/devicestorage/ipc/test_ipc.html
@@ -9,17 +9,18 @@
 
   <script type="application/javascript;version=1.7">
     "use strict";
 
     SimpleTest.waitForExplicitFinish();
 
     function iframeScriptFirst() {
       content.wrappedJSObject.RunSet.reloadAndRunAll({
-        preventDefault: function() { }
+          preventDefault: function() { },
+          __exposedProps__: { preventDefault: 'r' }
       });
     }
 
     function iframeScriptSecond() {
       let TestRunner = content.wrappedJSObject.TestRunner;
 
       let oldComplete = TestRunner.onComplete;
 
@@ -39,17 +40,17 @@
       TestRunner.log = function(msg) {
         sendAsyncMessage("test:DeviceStorage:ipcTestMessage", { msg: msg });
       }
     }
 
     let regex = /^(TEST-PASS|TEST-UNEXPECTED-PASS|TEST-KNOWN-FAIL|TEST-UNEXPECTED-FAIL|TEST-DEBUG-INFO) \| ([^\|]+) \|(.*)/;
 
     function onTestMessage(data) {
-      let message = data.json.msg;
+      let message = SpecialPowers.wrap(data).json.msg;
       let match = regex.exec(message);
       if (match) {
         let state = match[1];
         let details = match[2] + " | " + match[3];
 
         switch (state) {
           case "TEST-PASS":
           case "TEST-KNOWN-FAIL":
--- a/dom/indexedDB/ipc/test_ipc.html
+++ b/dom/indexedDB/ipc/test_ipc.html
@@ -19,17 +19,18 @@
     SimpleTest.requestLongerTimeout(100);
 
     // Disable crash observers as it breaks later tests.
     function iframeScriptFirst() {
       SpecialPowers.prototype.registerProcessCrashObservers = function() { };
       SpecialPowers.prototype.unregisterProcessCrashObservers = function() { };
 
       content.wrappedJSObject.RunSet.reloadAndRunAll({
-        preventDefault: function() { }
+        preventDefault: function() { },
+        __exposedProps__: { preventDefault: 'r' }
       });
     }
 
     function iframeScriptSecond() {
       let TestRunner = content.wrappedJSObject.TestRunner;
 
       let oldComplete = TestRunner.onComplete;
 
@@ -53,17 +54,17 @@
 
     let regexString =
       "^(TEST-PASS|TEST-UNEXPECTED-PASS|TEST-KNOWN-FAIL|TEST-UNEXPECTED-FAIL" +
       "|TEST-DEBUG-INFO) \\| ([^\\|]+) \\|(.*)";
 
     let regex = new RegExp(regexString);
 
     function onTestMessage(data) {
-      let message = data.json.msg;
+      let message = SpecialPowers.wrap(data).json.msg;
       let match = regex.exec(message);
       if (match) {
         let state = match[1];
         let details = match[2] + " | " + match[3];
 
         switch (state) {
           case "TEST-PASS":
           case "TEST-KNOWN-FAIL":