Bug 1530879 - Update the test262 import to upstream rev 4f1155c566a222238fd86f179c6635ecb4c289bb. r=jorendorff
authorJeff Walden <jwalden@mit.edu>
Tue, 26 Feb 2019 17:06:48 -0800
changeset 461658 56404185f10118e5e12f3749bd366011ddc9556e
parent 461657 797e4b802321d7a52e3fe4d8f67cea5b4446d24c
child 461659 03c7eccbb595ce3684ce67363b68b74f42f00d7b
push id35626
push usercsabou@mozilla.com
push dateThu, 28 Feb 2019 11:31:08 +0000
treeherdermozilla-central@2ea0c1db7e60 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1530879
milestone67.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 1530879 - Update the test262 import to upstream rev 4f1155c566a222238fd86f179c6635ecb4c289bb. r=jorendorff
js/src/tests/jstests.list
js/src/tests/test262/GIT-INFO
js/src/tests/test262/intl402/ListFormat/constructor/supportedLocalesOf/result-type.js
js/src/tests/test262/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/result-type.js
js/src/tests/test262/intl402/Segmenter/constructor/supportedLocalesOf/result-type.js
js/src/tests/test262/intl402/supportedLocalesOf-returned-array-elements-are-frozen.js
js/src/tests/test262/intl402/supportedLocalesOf-returned-array-elements-are-not-frozen.js
--- a/js/src/tests/jstests.list
+++ b/js/src/tests/jstests.list
@@ -1218,16 +1218,21 @@ skip script test262/annexB/built-ins/Fun
 skip script test262/annexB/language/function-code/block-decl-nested-blocks-with-fun-decl.js
 
 # https://bugzilla.mozilla.org/show_bug.cgi?id=1406171
 skip script test262/built-ins/Reflect/ownKeys/return-on-corresponding-order-large-index.js
 
 # https://bugzilla.mozilla.org/show_bug.cgi?id=1473229
 skip include test262/intl402/RelativeTimeFormat/prototype/formatToParts/jstests.list
 
+# SupportedLocales in the Intl spec returns a non-frozen array after
+# https://github.com/tc39/ecma402/pull/278 -- bug 1530848.
+skip script test262/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/result-type.js
+skip script test262/intl402/supportedLocalesOf-returned-array-elements-are-not-frozen.js
+
 # https://bugzilla.mozilla.org/show_bug.cgi?id=1508683
 skip script test262/built-ins/RegExp/prototype/multiline/cross-realm.js
 skip script test262/built-ins/RegExp/prototype/global/cross-realm.js
 skip script test262/built-ins/RegExp/prototype/sticky/cross-realm.js
 skip script test262/built-ins/RegExp/prototype/ignoreCase/cross-realm.js
 skip script test262/built-ins/RegExp/prototype/unicode/cross-realm.js
 skip script test262/built-ins/RegExp/prototype/source/cross-realm.js
 
--- a/js/src/tests/test262/GIT-INFO
+++ b/js/src/tests/test262/GIT-INFO
@@ -1,8 +1,5 @@
-commit d53256c971f3b6b6d709a909446919b7bb56f3b5
-Merge: 5331ca05a2 f624ca52d1
-Author: Leo Balter <leonardo.balter@gmail.com>
-Date:   Fri Jan 18 11:17:04 2019 -0200
+commit 4f1155c566a222238fd86f179c6635ecb4c289bb
+Author: Frank Yung-Fong Tang <41213225+FrankYFTang@users.noreply.github.com>
+Date:   Fri Jan 18 08:15:37 2019 -0800
 
-    Merge pull request #2038 from nicolo-ribaudo/patch-3
-    
-    Add missing features to private elements tests
+    Change tests according to ecma402/pull/278 (#2031)
--- a/js/src/tests/test262/intl402/ListFormat/constructor/supportedLocalesOf/result-type.js
+++ b/js/src/tests/test262/intl402/ListFormat/constructor/supportedLocalesOf/result-type.js
@@ -17,21 +17,20 @@ assert.sameValue(Array.isArray(result), 
 assert.sameValue(Object.getPrototypeOf(result), Array.prototype,
   "The prototype should be Array.prototype");
 assert.sameValue(Object.isExtensible(result), true,
   "Object.isExtensible() should return true");
 
 assert.notSameValue(result.length, 0);
 for (let i = 0; i < result.length; ++i) {
   verifyProperty(result, String(i), {
-    "writable": false,
+    "writable": true,
     "enumerable": true,
-    "configurable": false,
+    "configurable": true,
   });
 }
 
 verifyProperty(result, "length", {
-  "writable": false,
   "enumerable": false,
   "configurable": false,
 });
 
 reportCompare(0, 0);
--- a/js/src/tests/test262/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/result-type.js
+++ b/js/src/tests/test262/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/result-type.js
@@ -16,21 +16,20 @@ assert.sameValue(Array.isArray(result), 
 assert.sameValue(Object.getPrototypeOf(result), Array.prototype,
   "The prototype should be Array.prototype");
 assert.sameValue(Object.isExtensible(result), true,
   "Object.isExtensible() should return true");
 
 assert.notSameValue(result.length, 0);
 for (let i = 0; i < result.length; ++i) {
   verifyProperty(result, String(i), {
-    "writable": false,
+    "writable": true,
     "enumerable": true,
-    "configurable": false,
+    "configurable": true,
   });
 }
 
 verifyProperty(result, "length", {
-  "writable": false,
   "enumerable": false,
   "configurable": false,
 });
 
 reportCompare(0, 0);
--- a/js/src/tests/test262/intl402/Segmenter/constructor/supportedLocalesOf/result-type.js
+++ b/js/src/tests/test262/intl402/Segmenter/constructor/supportedLocalesOf/result-type.js
@@ -17,21 +17,20 @@ assert.sameValue(Array.isArray(result), 
 assert.sameValue(Object.getPrototypeOf(result), Array.prototype,
   "The prototype should be Array.prototype");
 assert.sameValue(Object.isExtensible(result), true,
   "Object.isExtensible() should return true");
 
 assert.notSameValue(result.length, 0);
 for (let i = 0; i < result.length; ++i) {
   verifyProperty(result, String(i), {
-    "writable": false,
+    "writable": true,
     "enumerable": true,
-    "configurable": false,
+    "configurable": true,
   });
 }
 
 verifyProperty(result, "length", {
-  "writable": false,
   "enumerable": false,
   "configurable": false,
 });
 
 reportCompare(0, 0);
deleted file mode 100644
--- a/js/src/tests/test262/intl402/supportedLocalesOf-returned-array-elements-are-frozen.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 Mozilla Corporation. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-es5id: 9.2.8_4
-description: >
-    Tests that the array returned by SupportedLocales is extensible,
-    but its properties are non-writable/non-configurable.
-author: Norbert Lindenberg
-includes: [testIntl.js]
----*/
-
-function testFrozenProperty(obj, property) {
-    var desc = Object.getOwnPropertyDescriptor(obj, property);
-    assert.sameValue(desc.writable, false, "Property " + property + " of object returned by SupportedLocales is writable.");
-    assert.sameValue(desc.configurable, false, "Property " + property + " of object returned by SupportedLocales is configurable.");
-}
-
-testWithIntlConstructors(function (Constructor) {
-    var defaultLocale = new Constructor().resolvedOptions().locale;
-    var supported = Constructor.supportedLocalesOf([defaultLocale]);
-    assert(Object.isExtensible(supported), "Object returned by SupportedLocales is not extensible.");
-    for (var i = 0; i < supported.length; i++) {
-        testFrozenProperty(supported, i);
-    }
-    testFrozenProperty(supported, "length");
-});
-
-reportCompare(0, 0);
new file mode 100644
--- /dev/null
+++ b/js/src/tests/test262/intl402/supportedLocalesOf-returned-array-elements-are-not-frozen.js
@@ -0,0 +1,35 @@
+// Copyright 2012 Mozilla Corporation. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 9.2.8_4
+description: >
+    Tests that the array returned by SupportedLocales is extensible,
+    writable and configurable.
+author: Norbert Lindenberg
+includes: [testIntl.js]
+---*/
+
+function testNormalProperty(obj, property) {
+    var desc = Object.getOwnPropertyDescriptor(obj, property);
+    assert.sameValue(desc.writable, true, "Property " + property + " of object returned by SupportedLocales is not writable.");
+    assert.sameValue(desc.configurable, true, "Property " + property + " of object returned by SupportedLocales is not configurable.");
+}
+
+function testLengthProperty(obj, property) {
+    var desc = Object.getOwnPropertyDescriptor(obj, property);
+    assert.sameValue(desc.writable, true, "Property " + property + " of object returned by SupportedLocales is not writable.");
+    assert.sameValue(desc.configurable, false, "Property " + property + " of object returned by SupportedLocales is configurable.");
+}
+
+testWithIntlConstructors(function (Constructor) {
+    var defaultLocale = new Constructor().resolvedOptions().locale;
+    var supported = Constructor.supportedLocalesOf([defaultLocale]);
+    assert(Object.isExtensible(supported), "Object returned by SupportedLocales is not extensible.");
+    for (var i = 0; i < supported.length; i++) {
+        testNormalProperty(supported, i);
+    }
+    testLengthProperty(supported, "length");
+});
+
+reportCompare(0, 0);