Bug 1183825 - Hide PushMessageData methods until we support sending push data. r=mt,smaug
authorNikhil Marathe <nsm.nikhil@gmail.com>
Tue, 14 Jul 2015 13:45:01 -0700
changeset 252903 2d2c3e879545268d628505c693cf4dcf9615bacb
parent 252902 a85971b21cf7290ea425c95f63607ec65da03b22
child 252904 2fcda90e38a23b489b4fd5281cf79dc745ea2117
push id62279
push usernsm.nikhil@gmail.com
push dateWed, 15 Jul 2015 01:26:29 +0000
treeherdermozilla-inbound@0560abdc67cf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmt, smaug
bugs1183825
milestone42.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 1183825 - Hide PushMessageData methods until we support sending push data. r=mt,smaug
dom/push/test/worker.js
dom/webidl/PushMessageData.webidl
--- a/dom/push/test/worker.js
+++ b/dom/push/test/worker.js
@@ -2,16 +2,20 @@
 // http://creativecommons.org/licenses/publicdomain/
 
 this.onpush = handlePush;
 
 function handlePush(event) {
 
   self.clients.matchAll().then(function(result) {
     if (event instanceof PushEvent &&
-      event.data instanceof PushMessageData) {
+      event.data instanceof PushMessageData &&
+      event.data.text === undefined &&
+      event.data.json === undefined &&
+      event.data.arrayBuffer === undefined &&
+      event.data.blob === undefined) {
 
       result[0].postMessage({type: "finished", okay: "yes"});
       return;
     }
     result[0].postMessage({type: "finished", okay: "no"});
   });
 }
--- a/dom/webidl/PushMessageData.webidl
+++ b/dom/webidl/PushMessageData.webidl
@@ -5,13 +5,15 @@
  *
  * The origin of this IDL file is
  * https://w3c.github.io/push-api/
  */
 
 [Exposed=ServiceWorker]
 interface PushMessageData
 {
-    ArrayBuffer arrayBuffer();
-    Blob        blob();
-    object      json();
-    USVString   text();
-};
\ No newline at end of file
+    // FIXME(nsm): Bug 1149195.
+    // These methods will be exposed once encryption is supported.
+    // ArrayBuffer arrayBuffer();
+    // Blob        blob();
+    // object      json();
+    // USVString   text();
+};