Bug 1304966 - Mark Storage APIs as nightly-only r=bz a=me CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Fri, 28 Oct 2016 11:28:51 -0700
changeset 346661 4f43fa0be4394873392d847d78d2a20d01482f0d
parent 346660 6f5c85e2f3f886f42a53fc926e265b476b642ea7
child 346662 9c1b8232382aea0f3443c87966f209c5a86e80ae
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, me
bugs1304966
milestone52.0a1
Bug 1304966 - Mark Storage APIs as nightly-only r=bz a=me CLOSED TREE
dom/tests/mochitest/general/test_interfaces.html
dom/workers/test/navigator_worker.js
dom/workers/test/serviceworkers/test_serviceworker_interfaces.js
dom/workers/test/test_navigator.html
dom/workers/test/test_worker_interfaces.js
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -881,17 +881,17 @@ var interfaceNamesInGlobalScope =
     {name: "SpecialPowers", xbl: false},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "StereoPannerNode",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "Storage",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "StorageEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "StorageManager",
+    {name: "StorageManager", nightly: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "StyleSheet",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "StyleSheetList",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "SubtleCrypto",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "SVGAElement",
--- a/dom/workers/test/navigator_worker.js
+++ b/dom/workers/test/navigator_worker.js
@@ -10,39 +10,40 @@ var supportedProps = [
   "appVersion",
   "platform",
   "product",
   "userAgent",
   "onLine",
   "language",
   "languages",
   "hardwareConcurrency",
-  "storage"
+  { name: "storage", nightly: true },
 ];
 
 self.onmessage = function(event) {
   if (!event || !event.data) {
     return;
   }
 
-  startTest(event.data.isB2G);
+  startTest(event.data);
 };
 
-function startTest(isB2G) {
+function startTest(channelData) {
   // Prepare the interface map showing if a propery should exist in this build.
   // For example, if interfaceMap[foo] = true means navigator.foo should exist.
   var interfaceMap = {};
 
   for (var prop of supportedProps) {
     if (typeof(prop) === "string") {
       interfaceMap[prop] = true;
       continue;
     }
 
-    if (prop.b2g === !isB2G) {
+    if (prop.nightly === !channelData.isNightly ||
+        prop.release === !channelData.isRelease) {
       interfaceMap[prop.name] = false;
       continue;
     }
 
     interfaceMap[prop.name] = true;
   }
 
   for (var prop in navigator) {
--- a/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js
+++ b/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js
@@ -191,17 +191,17 @@ var interfaceNamesInGlobalScope =
     "Response",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "ServiceWorker",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "ServiceWorkerGlobalScope",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "ServiceWorkerRegistration",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "StorageManager",
+    {name: "StorageManager", nightly: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "SubtleCrypto",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "TextDecoder",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "TextEncoder",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "URL",
--- a/dom/workers/test/test_navigator.html
+++ b/dom/workers/test/test_navigator.html
@@ -49,16 +49,20 @@ Tests of DOM Worker Navigator
        "Mismatched navigator string for " + args.name + "!");
   };
 
   worker.onerror = function(event) {
     ok(false, "Worker had an error: " + event.message);
     SimpleTest.finish();
   }
 
-  worker.postMessage({ 'isB2G': SpecialPowers.isB2G });
+  var version = SpecialPowers.Cc["@mozilla.org/xre/app-info;1"].getService(SpecialPowers.Ci.nsIXULAppInfo).version;
+  var isNightly = version.endsWith("a1");
+  var isRelease = !version.includes("a");
+
+  worker.postMessage({ isNightly, isRelease });
 
   SimpleTest.waitForExplicitFinish();
 
 </script>
 </pre>
 </body>
 </html>
--- a/dom/workers/test/test_worker_interfaces.js
+++ b/dom/workers/test/test_worker_interfaces.js
@@ -174,17 +174,17 @@ var interfaceNamesInGlobalScope =
     "PushSubscriptionOptions",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "Request",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "Response",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "ServiceWorkerRegistration",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "StorageManager",
+    {name: "StorageManager", nightly: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "SubtleCrypto",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "TextDecoder",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "TextEncoder",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "XMLHttpRequest",