Bug 1511232. Add checks for RELEASE_OR_BETA for now. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 11 Jan 2019 12:59:30 +0000
changeset 510698 199b64bd4ead7f270101d53e2e781edfb22a63a5
parent 510697 47920e0b9643e317840bc88d705582ea537d8ed8
child 510699 c28b226ee6c1d383487fb7dd75a14f419221a143
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs1511232
milestone66.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 1511232. Add checks for RELEASE_OR_BETA for now. r=peterv Once we decide that we're shipping this non-configurability behavior, we can remove these bits. Differential Revision: https://phabricator.services.mozilla.com/D16061
dom/base/test/test_window_define_nonconfigurable.html
--- a/dom/base/test/test_window_define_nonconfigurable.html
+++ b/dom/base/test/test_window_define_nonconfigurable.html
@@ -5,73 +5,105 @@ https://bugzilla.mozilla.org/show_bug.cg
 -->
 <head>
   <meta charset="utf-8">
   <title>Test for Bug 1107443</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
+  var {AppConstants} = SpecialPowers.Cu.import("resource://gre/modules/AppConstants.jsm", {});
+
   /**
    * Test for Bug 1107443, modified when it was backed out in bug 1329323.
    * This is now testing the _current_ behavior, not the desired one; expect
    * failures in this test and needing to update it when bug 1329324 is
    * fixed.
    */
   var retval = Object.defineProperty(window, "nosuchprop",
                                      { value: 5, configurable: false });
-  is(retval, false,
-     "Should return false when 'failing' to define non-configurable property via Object.defineProperty.")
+  if (AppConstants.RELEASE_OR_BETA) {
+    todo_is(retval, false,
+            "Should return false when 'failing' to define non-configurable property via Object.defineProperty.")
+  } else {
+    is(retval, false,
+       "Should return false when 'failing' to define non-configurable property via Object.defineProperty.")
+  }
   var desc = Object.getOwnPropertyDescriptor(window, "nosuchprop");
   is(typeof(desc), "object", "Should have a property 'nosuchprop' now");
-  is(desc.configurable, true,
-     "Property 'nosuchprop' should be configurable");
+  if (AppConstants.RELEASE_OR_BETA) {
+    todo_is(desc.configurable, true,
+            "Property 'nosuchprop' should be configurable");
+  } else {
+    is(desc.configurable, true,
+       "Property 'nosuchprop' should be configurable");
+  }
   is(desc.writable, false, "Property 'nosuchprop' should be readonly");
   is(desc.value, 5, "Property 'nosuchprop' should have the right value");
 
   retval = Object.defineProperty(window, "nosuchprop2", { value: 6 });
   is(retval, window,
      "Should return object when succesfully defining 'nosuchprop2'");
   desc = Object.getOwnPropertyDescriptor(window, "nosuchprop2");
   is(typeof(desc), "object", "Should have a property 'nosuchprop2' now");
-  is(desc.configurable, true,
-     "Property 'nosuchprop2' should be configurable");
+  if (AppConstants.RELEASE_OR_BETA) {
+    todo_is(desc.configurable, true,
+            "Property 'nosuchprop2' should be configurable");
+  } else {
+    is(desc.configurable, true,
+       "Property 'nosuchprop2' should be configurable");
+  }
   is(desc.writable, false, "Property 'nosuchprop2' should be readonly");
   is(desc.value, 6, "Property 'nosuchprop2' should have the right value");
 
   retval = Object.defineProperty(window, "nosuchprop3",
                                  { value: 7, configurable: true });
   is(retval, window,
      "Should return object when succesfully defining 'nosuchprop3'");
   desc = Object.getOwnPropertyDescriptor(window, "nosuchprop3");
   is(typeof(desc), "object", "Should have a property 'nosuchprop3' now");
   is(desc.configurable, true,
           "Property 'nosuchprop3' should be configurable");
   is(desc.writable, false, "Property 'nosuchprop3' should be readonly");
   is(desc.value, 7, "Property 'nosuchprop3' should have the right value");
 
   retval = Reflect.defineProperty(window, "nosuchprop4",
                                   { value: 8, configurable: false });
-  is(retval, false,
-     "Should not be able to Reflect.defineProperty if non-configurable");
+  if (AppConstants.RELEASE_OR_BETA) {
+    todo_is(retval, false,
+            "Should not be able to Reflect.defineProperty if non-configurable");
+  } else {
+    is(retval, false,
+       "Should not be able to Reflect.defineProperty if non-configurable");
+  }
   desc = Object.getOwnPropertyDescriptor(window, "nosuchprop4");
   is(typeof(desc), "object", "Should have a property 'nosuchprop4' now");
-  is(desc.configurable, true,
-     "Property 'nosuchprop4' should be configurable");
+  if (AppConstants.RELEASE_OR_BETA) {
+    todo_is(desc.configurable, true,
+            "Property 'nosuchprop4' should be configurable");
+  } else {
+    is(desc.configurable, true,
+       "Property 'nosuchprop4' should be configurable");
+  }
   is(desc.writable, false, "Property 'nosuchprop4' should be readonly");
   is(desc.value, 8, "Property 'nosuchprop4' should have the right value");
 
   retval = Reflect.defineProperty(window, "nosuchprop5",
                                   { value: 9 });
   is(retval, true,
      "Should be able to Reflect.defineProperty with default configurability");
   desc = Object.getOwnPropertyDescriptor(window, "nosuchprop5");
   is(typeof(desc), "object", "Should have a property 'nosuchprop5' now");
-  is(desc.configurable, true,
-     "Property 'nosuchprop5' should be configurable");
+  if (AppConstants.RELEASE_OR_BETA) {
+    todo_is(desc.configurable, true,
+            "Property 'nosuchprop5' should be configurable");
+  } else {
+    is(desc.configurable, true,
+       "Property 'nosuchprop5' should be configurable");
+  }
   is(desc.writable, false, "Property 'nosuchprop5' should be readonly");
   is(desc.value, 9, "Property 'nosuchprop5' should have the right value");
 
   retval = Reflect.defineProperty(window, "nosuchprop6",
                                   { value: 10, configurable: true });
   is(retval, true,
      "Should be able to Reflect.defineProperty if configurable");
   desc = Object.getOwnPropertyDescriptor(window, "nosuchprop6");