Bug 1057558 - Fix IPC test results not being reported in first iframe. r=drno
authorAhmed Kachkach <ahmed.kachkach@gmail.com>
Tue, 26 Aug 2014 15:53:00 +0200
changeset 223558 245673603037e8ebd8cf6ad01c8515307909cc11
parent 223557 2984228b8fb120f57d91ef79fe5a39f4e70f4531
child 223559 01d2edd3c66f41328c5907b947bf1d033530139a
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdrno
bugs1057558
milestone34.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 1057558 - Fix IPC test results not being reported in first iframe. r=drno
content/media/webspeech/synth/ipc/test/file_ipc.html
dom/devicestorage/ipc/test_ipc.html
dom/indexedDB/ipc/test_ipc.html
dom/media/tests/ipc/test_ipc.html
--- a/content/media/webspeech/synth/ipc/test/file_ipc.html
+++ b/content/media/webspeech/synth/ipc/test/file_ipc.html
@@ -45,29 +45,28 @@
     let VALID_ACTIONS = ['suite_start', 'suite_end', 'test_start', 'test_end', 'test_status', 'process_output', 'log'];
     function validStructuredMessage(message) {
       return message.action !== undefined && VALID_ACTIONS.indexOf(message.action) >= 0;
     }
     function onTestMessage(data) {
       let message = SpecialPowers.wrap(data).data.msg;
 
       if (validStructuredMessage(message)) {
-        if (message.test === undefined || message.message === undefined) {
-            return;
-        }
-
-        let details = message.test + " | " + message.message;
-
-        switch(message.action) {
+        switch (message.action) {
           case "test_status":
+            ok(message.expected === undefined, message.subtest, message.message);
+            break;
           case "test_end":
             ok(message.expected === undefined, message.test, message.message);
             break;
+          case "log":
+            info(message.message);
+            break;
           default:
-            info(details);
+            // nothing
         }
       }
     }
 
     function onTestComplete() {
       let comp = SpecialPowers.wrap(SpecialPowers.Components);
       let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
       let spObserver = comp.classes["@mozilla.org/special-powers-observer;1"]
--- a/dom/devicestorage/ipc/test_ipc.html
+++ b/dom/devicestorage/ipc/test_ipc.html
@@ -44,28 +44,28 @@
     let VALID_ACTIONS = ['suite_start', 'suite_end', 'test_start', 'test_end', 'test_status', 'process_output', 'log'];
     function validStructuredMessage(message) {
       return message.action !== undefined && VALID_ACTIONS.indexOf(message.action) >= 0;
     }
     function onTestMessage(data) {
       let message = SpecialPowers.wrap(data).data.msg;
 
       if (validStructuredMessage(message)) {
-        if (message.test === undefined || message.message === undefined) {
-          return;
-        }
-
         switch (message.action) {
           case "test_status":
+            ok(message.expected === undefined, message.subtest, message.message);
+            break;
           case "test_end":
             ok(message.expected === undefined, message.test, message.message);
             break;
+          case "log":
+            info(message.message);
+            break;
           default:
-            let details = message.test + " | " + message.message;
-            info(details);
+            // nothing
         }
       }
     }
 
     function onTestComplete() {
       let comp = SpecialPowers.wrap(SpecialPowers.Components);
       let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
       let spObserver = comp.classes["@mozilla.org/special-powers-observer;1"]
--- a/dom/indexedDB/ipc/test_ipc.html
+++ b/dom/indexedDB/ipc/test_ipc.html
@@ -60,28 +60,28 @@
     function validStructuredMessage(message) {
       return message.action !== undefined && VALID_ACTIONS.indexOf(message.action) >= 0;
     }
     function onTestMessage(data) {
       seenTestMessage = true;
       let message = SpecialPowers.wrap(data).data.msg;
 
       if (validStructuredMessage(message)) {
-        if (message.test === undefined || message.message === undefined) {
-          return;
-        }
-
         switch (message.action) {
           case "test_status":
+            ok(message.expected === undefined, message.subtest, message.message);
+            break;
           case "test_end":
             ok(message.expected === undefined, message.test, message.message);
             break;
+          case "log":
+            info(message.message);
+            break;
           default:
-            let details = message.test + " | " + message.message;
-            info(details);
+            // nothing
         }
       }
     }
 
     let usingChildProcess = false;
 
     function onProcessType(data) {
       let isMainProcess = SpecialPowers.wrap(data).data.isMainProcess;
--- a/dom/media/tests/ipc/test_ipc.html
+++ b/dom/media/tests/ipc/test_ipc.html
@@ -53,28 +53,28 @@
     let VALID_ACTIONS = ['suite_start', 'suite_end', 'test_start', 'test_end', 'test_status', 'process_output', 'log'];
     function validStructuredMessage(message) {
       return message.action !== undefined && VALID_ACTIONS.indexOf(message.action) >= 0;
     }
     function onTestMessage(data) {
       let message = SpecialPowers.wrap(data).data.msg;
 
       if (validStructuredMessage(message)) {
-        if (message.test === undefined || message.message === undefined) {
-          return;
-        }
-
         switch (message.action) {
           case "test_status":
+            ok(message.expected === undefined, message.subtest, message.message);
+            break;
           case "test_end":
             ok(message.expected === undefined, message.test, message.message);
             break;
+          case "log":
+            info(message.message);
+            break;
           default:
-            let details = message.test + " | " + message.message;
-            info(details);
+            // nothing
         }
       }
     }
 
     function onTestComplete() {
       let comp = SpecialPowers.wrap(SpecialPowers.Components);
       let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
       let spObserver = comp.classes["@mozilla.org/special-powers-observer;1"]