From b5efa1dd834ad4314da0f1a04b8ae3882039930f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Bargull?= <andre.bargull@gmail.com>
Date: Wed, 8 Jul 2015 19:12:39 +0200
Subject: [PATCH 1/4] Update comments to match correct ES2015 chapter

---
 test/intl402/10.1_L15.js       | 4 ++--
 test/intl402/10.2.2_L15.js     | 4 ++--
 test/intl402/10.3.2_1_a_L15.js | 4 ++--
 test/intl402/10.3.2_L15.js     | 4 ++--
 test/intl402/10.3.3_L15.js     | 4 ++--
 test/intl402/10.3_L15.js       | 4 ++--
 test/intl402/11.1_L15.js       | 4 ++--
 test/intl402/11.2.2_L15.js     | 4 ++--
 test/intl402/11.3.2_1_a_L15.js | 4 ++--
 test/intl402/11.3.2_L15.js     | 2 +-
 test/intl402/11.3.3_L15.js     | 4 ++--
 test/intl402/11.3_L15.js       | 4 ++--
 test/intl402/12.1_L15.js       | 4 ++--
 test/intl402/12.2.2_L15.js     | 4 ++--
 test/intl402/12.3.2_1_a_L15.js | 4 ++--
 test/intl402/12.3.2_L15.js     | 2 +-
 test/intl402/12.3.3_L15.js     | 4 ++--
 test/intl402/12.3_L15.js       | 4 ++--
 test/intl402/13.1.1_L15.js     | 4 ++--
 test/intl402/13.2.1_L15.js     | 4 ++--
 test/intl402/13.3.1_L15.js     | 4 ++--
 test/intl402/13.3.2_L15.js     | 4 ++--
 test/intl402/13.3.3_L15.js     | 4 ++--
 test/intl402/8.0_L15.js        | 4 ++--
 24 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/test/intl402/10.1_L15.js b/test/intl402/10.1_L15.js
index 833b7fb1a0..3446d7cfe0 100644
--- a/test/intl402/10.1_L15.js
+++ b/test/intl402/10.1_L15.js
@@ -4,8 +4,8 @@
 /*---
 es5id: 10.1_L15
 description: >
-    Tests that Intl.Collator  meets the requirements for built-in
-    objects defined by the introduction of  chapter 15 of the
+    Tests that Intl.Collator meets the requirements for built-in
+    objects defined by the introduction of chapter 17 of the
     ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
diff --git a/test/intl402/10.2.2_L15.js b/test/intl402/10.2.2_L15.js
index 3e1d314f46..c5c41db3ae 100644
--- a/test/intl402/10.2.2_L15.js
+++ b/test/intl402/10.2.2_L15.js
@@ -4,9 +4,9 @@
 /*---
 es5id: 10.2.2_L15
 description: >
-    Tests that Intl.Collator.supportedLocalesOf  meets the
+    Tests that Intl.Collator.supportedLocalesOf meets the
     requirements for built-in objects defined by the introduction of
-    chapter 15 of the ECMAScript Language Specification.
+    chapter 17 of the ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
 ---*/
diff --git a/test/intl402/10.3.2_1_a_L15.js b/test/intl402/10.3.2_1_a_L15.js
index 15236a162c..657845eaac 100644
--- a/test/intl402/10.3.2_1_a_L15.js
+++ b/test/intl402/10.3.2_1_a_L15.js
@@ -5,8 +5,8 @@
 es5id: 10.3.2_1_a_L15
 description: >
     Tests that the function returned by
-    Intl.Collator.prototype.compare  meets the requirements for
-    built-in objects defined by the introduction of  chapter 15 of the
+    Intl.Collator.prototype.compare meets the requirements for
+    built-in objects defined by the introduction of chapter 17 of the
     ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
diff --git a/test/intl402/10.3.2_L15.js b/test/intl402/10.3.2_L15.js
index cc52f61fc0..f83d063d28 100644
--- a/test/intl402/10.3.2_L15.js
+++ b/test/intl402/10.3.2_L15.js
@@ -4,9 +4,9 @@
 /*---
 es5id: 10.3.2_L15
 description: >
-    Tests that the getter for Intl.Collator.prototype.compare  meets
+    Tests that the getter for Intl.Collator.prototype.compare meets
     the requirements for built-in objects defined by the introduction
-    of  chapter 15 of the ECMAScript Language Specification.
+    of chapter 17 of the ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
 ---*/
diff --git a/test/intl402/10.3.3_L15.js b/test/intl402/10.3.3_L15.js
index e6892b183d..59792f058c 100644
--- a/test/intl402/10.3.3_L15.js
+++ b/test/intl402/10.3.3_L15.js
@@ -4,9 +4,9 @@
 /*---
 es5id: 10.3.3_L15
 description: >
-    Tests that Intl.Collator.prototype.resolvedOptions  meets the
+    Tests that Intl.Collator.prototype.resolvedOptions meets the
     requirements for built-in objects defined by the introduction of
-    chapter 15 of the ECMAScript Language Specification.
+    chapter 17 of the ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
 ---*/
diff --git a/test/intl402/10.3_L15.js b/test/intl402/10.3_L15.js
index f7f3e17b08..e2d458b156 100644
--- a/test/intl402/10.3_L15.js
+++ b/test/intl402/10.3_L15.js
@@ -4,8 +4,8 @@
 /*---
 es5id: 10.3_L15
 description: >
-    Tests that Intl.Collator.prototype  meets the requirements for
-    built-in objects defined by the introduction of  chapter 15 of the
+    Tests that Intl.Collator.prototype meets the requirements for
+    built-in objects defined by the introduction of chapter 17 of the
     ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
diff --git a/test/intl402/11.1_L15.js b/test/intl402/11.1_L15.js
index 7d1ff5e994..4ac63e4edf 100644
--- a/test/intl402/11.1_L15.js
+++ b/test/intl402/11.1_L15.js
@@ -4,8 +4,8 @@
 /*---
 es5id: 11.1_L15
 description: >
-    Tests that Intl.NumberFormat  meets the requirements for built-in
-    objects defined by the introduction of  chapter 15 of the
+    Tests that Intl.NumberFormat meets the requirements for built-in
+    objects defined by the introduction of chapter 17 of the
     ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
diff --git a/test/intl402/11.2.2_L15.js b/test/intl402/11.2.2_L15.js
index ae828988c5..e04db78419 100644
--- a/test/intl402/11.2.2_L15.js
+++ b/test/intl402/11.2.2_L15.js
@@ -4,9 +4,9 @@
 /*---
 es5id: 11.2.2_L15
 description: >
-    Tests that Intl.NumberFormat.supportedLocalesOf  meets the
+    Tests that Intl.NumberFormat.supportedLocalesOf meets the
     requirements for built-in objects defined by the introduction of
-    chapter 15 of the ECMAScript Language Specification.
+    chapter 17 of the ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
 ---*/
diff --git a/test/intl402/11.3.2_1_a_L15.js b/test/intl402/11.3.2_1_a_L15.js
index d27d1090b9..cdfcf10528 100644
--- a/test/intl402/11.3.2_1_a_L15.js
+++ b/test/intl402/11.3.2_1_a_L15.js
@@ -5,8 +5,8 @@
 es5id: 11.3.2_1_a_L15
 description: >
     Tests that the function returned by
-    Intl.NumberFormat.prototype.format  meets the requirements for
-    built-in objects defined by the introduction of  chapter 15 of the
+    Intl.NumberFormat.prototype.format meets the requirements for
+    built-in objects defined by the introduction of chapter 17 of the
     ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
diff --git a/test/intl402/11.3.2_L15.js b/test/intl402/11.3.2_L15.js
index 04eddf44bc..047046611b 100644
--- a/test/intl402/11.3.2_L15.js
+++ b/test/intl402/11.3.2_L15.js
@@ -6,7 +6,7 @@ es5id: 11.3.2_L15
 description: >
     Tests that the getter for Intl.NumberFormat.prototype.format
     meets the requirements for built-in objects defined by the
-    introduction of  chapter 15 of the ECMAScript Language
+    introduction of chapter 17 of the ECMAScript Language
     Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
diff --git a/test/intl402/11.3.3_L15.js b/test/intl402/11.3.3_L15.js
index d45d6ab2a4..9709ab848d 100644
--- a/test/intl402/11.3.3_L15.js
+++ b/test/intl402/11.3.3_L15.js
@@ -4,9 +4,9 @@
 /*---
 es5id: 11.3.3_L15
 description: >
-    Tests that Intl.NumberFormat.prototype.resolvedOptions  meets the
+    Tests that Intl.NumberFormat.prototype.resolvedOptions meets the
     requirements for built-in objects defined by the introduction of
-    chapter 15 of the ECMAScript Language Specification.
+    chapter 17 of the ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
 ---*/
diff --git a/test/intl402/11.3_L15.js b/test/intl402/11.3_L15.js
index e36f474a20..12917b1183 100644
--- a/test/intl402/11.3_L15.js
+++ b/test/intl402/11.3_L15.js
@@ -4,8 +4,8 @@
 /*---
 es5id: 11.3_L15
 description: >
-    Tests that Intl.NumberFormat.prototype  meets the requirements for
-    built-in objects defined by the introduction of  chapter 15 of the
+    Tests that Intl.NumberFormat.prototype meets the requirements for
+    built-in objects defined by the introduction of chapter 17 of the
     ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
diff --git a/test/intl402/12.1_L15.js b/test/intl402/12.1_L15.js
index e3b13f313f..3ff0986b20 100644
--- a/test/intl402/12.1_L15.js
+++ b/test/intl402/12.1_L15.js
@@ -4,8 +4,8 @@
 /*---
 es5id: 12.1_L15
 description: >
-    Tests that Intl.DateTimeFormat  meets the requirements for
-    built-in objects defined by the introduction of  chapter 15 of the
+    Tests that Intl.DateTimeFormat meets the requirements for
+    built-in objects defined by the introduction of chapter 17 of the
     ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
diff --git a/test/intl402/12.2.2_L15.js b/test/intl402/12.2.2_L15.js
index ba8ad9c69d..1451ba70a0 100644
--- a/test/intl402/12.2.2_L15.js
+++ b/test/intl402/12.2.2_L15.js
@@ -4,9 +4,9 @@
 /*---
 es5id: 12.2.2_L15
 description: >
-    Tests that Intl.DateTimeFormat.supportedLocalesOf  meets the
+    Tests that Intl.DateTimeFormat.supportedLocalesOf meets the
     requirements for built-in objects defined by the introduction of
-    chapter 15 of the ECMAScript Language Specification.
+    chapter 17 of the ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
 ---*/
diff --git a/test/intl402/12.3.2_1_a_L15.js b/test/intl402/12.3.2_1_a_L15.js
index ffb76b7d83..ecc3ae9f3f 100644
--- a/test/intl402/12.3.2_1_a_L15.js
+++ b/test/intl402/12.3.2_1_a_L15.js
@@ -5,8 +5,8 @@
 es5id: 12.3.2_1_a_L15
 description: >
     Tests that the function returned by
-    Intl.DateTimeFormat.prototype.format  meets the requirements for
-    built-in objects defined by the introduction of  chapter 15 of the
+    Intl.DateTimeFormat.prototype.format meets the requirements for
+    built-in objects defined by the introduction of chapter 17 of the
     ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
diff --git a/test/intl402/12.3.2_L15.js b/test/intl402/12.3.2_L15.js
index ef0280ccc2..18a216e611 100644
--- a/test/intl402/12.3.2_L15.js
+++ b/test/intl402/12.3.2_L15.js
@@ -6,7 +6,7 @@ es5id: 12.3.2_L15
 description: >
     Tests that the getter for Intl.DateTimeFormat.prototype.format
     meets the requirements for built-in objects defined by the
-    introduction of  chapter 15 of the ECMAScript Language
+    introduction of chapter 17 of the ECMAScript Language
     Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
diff --git a/test/intl402/12.3.3_L15.js b/test/intl402/12.3.3_L15.js
index a4de84c1bd..9ba1f1e6bb 100644
--- a/test/intl402/12.3.3_L15.js
+++ b/test/intl402/12.3.3_L15.js
@@ -4,9 +4,9 @@
 /*---
 es5id: 12.3.3_L15
 description: >
-    Tests that Intl.DateTimeFormat.prototype.resolvedOptions  meets
+    Tests that Intl.DateTimeFormat.prototype.resolvedOptions meets
     the requirements for built-in objects defined by the introduction
-    of  chapter 15 of the ECMAScript Language Specification.
+    of chapter 17 of the ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
 ---*/
diff --git a/test/intl402/12.3_L15.js b/test/intl402/12.3_L15.js
index c37c32c391..6139fc766f 100644
--- a/test/intl402/12.3_L15.js
+++ b/test/intl402/12.3_L15.js
@@ -4,8 +4,8 @@
 /*---
 es5id: 12.3_L15
 description: >
-    Tests that Intl.DateTimeFormat.prototype  meets the requirements
-    for built-in objects defined by the introduction of  chapter 15 of
+    Tests that Intl.DateTimeFormat.prototype meets the requirements
+    for built-in objects defined by the introduction of chapter 17 of
     the ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
diff --git a/test/intl402/13.1.1_L15.js b/test/intl402/13.1.1_L15.js
index fb28e49e65..552bfb34cd 100644
--- a/test/intl402/13.1.1_L15.js
+++ b/test/intl402/13.1.1_L15.js
@@ -4,8 +4,8 @@
 /*---
 es5id: 13.1.1_L15
 description: >
-    Tests that String.prototype.localeCompare  meets the requirements
-    for built-in objects defined by the introduction of  chapter 15 of
+    Tests that String.prototype.localeCompare meets the requirements
+    for built-in objects defined by the introduction of chapter 17 of
     the ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
diff --git a/test/intl402/13.2.1_L15.js b/test/intl402/13.2.1_L15.js
index f4b27e792b..5c20c41c45 100644
--- a/test/intl402/13.2.1_L15.js
+++ b/test/intl402/13.2.1_L15.js
@@ -4,8 +4,8 @@
 /*---
 es5id: 13.2.1_L15
 description: >
-    Tests that Number.prototype.toLocaleString  meets the requirements
-    for built-in objects defined by the introduction of  chapter 15 of
+    Tests that Number.prototype.toLocaleString meets the requirements
+    for built-in objects defined by the introduction of chapter 17 of
     the ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
diff --git a/test/intl402/13.3.1_L15.js b/test/intl402/13.3.1_L15.js
index 598359c182..bd49202ec7 100644
--- a/test/intl402/13.3.1_L15.js
+++ b/test/intl402/13.3.1_L15.js
@@ -4,8 +4,8 @@
 /*---
 es5id: 13.3.1_L15
 description: >
-    Tests that Date.prototype.toLocaleString  meets the requirements
-    for built-in objects defined by the introduction of  chapter 15 of
+    Tests that Date.prototype.toLocaleString meets the requirements
+    for built-in objects defined by the introduction of chapter 17 of
     the ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
diff --git a/test/intl402/13.3.2_L15.js b/test/intl402/13.3.2_L15.js
index 25fdf5b11f..277e109cfb 100644
--- a/test/intl402/13.3.2_L15.js
+++ b/test/intl402/13.3.2_L15.js
@@ -4,9 +4,9 @@
 /*---
 es5id: 13.3.2_L15
 description: >
-    Tests that Date.prototype.toLocaleDateString  meets the
+    Tests that Date.prototype.toLocaleDateString meets the
     requirements for built-in objects defined by the introduction of
-    chapter 15 of the ECMAScript Language Specification.
+    chapter 17 of the ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
 ---*/
diff --git a/test/intl402/13.3.3_L15.js b/test/intl402/13.3.3_L15.js
index 31147347b0..e5a33ffe07 100644
--- a/test/intl402/13.3.3_L15.js
+++ b/test/intl402/13.3.3_L15.js
@@ -4,9 +4,9 @@
 /*---
 es5id: 13.3.3_L15
 description: >
-    Tests that Date.prototype.toLocaleTimeString  meets the
+    Tests that Date.prototype.toLocaleTimeString meets the
     requirements for built-in objects defined by the introduction of
-    chapter 15 of the ECMAScript Language Specification.
+    chapter 17 of the ECMAScript Language Specification.
 author: Norbert Lindenberg
 includes: [testBuiltInObject.js]
 ---*/
diff --git a/test/intl402/8.0_L15.js b/test/intl402/8.0_L15.js
index 6304c79089..fc0b042591 100644
--- a/test/intl402/8.0_L15.js
+++ b/test/intl402/8.0_L15.js
@@ -4,8 +4,8 @@
 /*---
 es5id: 8.0_L15
 description: >
-    Tests that Intl  meets the requirements for built-in objects
-    defined by the introduction of  chapter 15 of the ECMAScript
+    Tests that Intl meets the requirements for built-in objects
+    defined by the introduction of chapter 17 of the ECMAScript
     Language Specification.
 author: Norbert Lindenberg
 includes:

From 888524ff1d9bcbb94975305d8a57162ff6a34c06 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Bargull?= <andre.bargull@gmail.com>
Date: Wed, 8 Jul 2015 19:13:06 +0200
Subject: [PATCH 2/4] Intl constructors are no longer able to initialize
 arbitrary objects as Intl objects. Update tests accordingly.

---
 test/intl402/10.1.1_1.js   | 37 ++++++++++++-------------------------
 test/intl402/10.1.2.1_4.js |  4 ++--
 test/intl402/11.1.1_1.js   | 37 ++++++++++++-------------------------
 test/intl402/11.1.2.1_4.js |  4 ++--
 test/intl402/12.1.1_1.js   | 37 ++++++++++++-------------------------
 test/intl402/12.1.2.1_4.js |  4 ++--
 6 files changed, 42 insertions(+), 81 deletions(-)

diff --git a/test/intl402/10.1.1_1.js b/test/intl402/10.1.1_1.js
index d0a608a369..42f4fe67b6 100644
--- a/test/intl402/10.1.1_1.js
+++ b/test/intl402/10.1.1_1.js
@@ -3,40 +3,27 @@
 
 /*---
 es5id: 10.1.1_1
-description: Tests that an object can't be re-initialized as a Collator.
+description: Tests that the this-value is ignored in Collator.
 author: Norbert Lindenberg
 includes: [testIntl.js]
 ---*/
 
 testWithIntlConstructors(function (Constructor) {
-    var obj, error;
-    
+    var obj, newObj;
+
     // variant 1: use constructor in a "new" expression
     obj = new Constructor();
-    try {
-        Intl.Collator.call(obj);
-    } catch (e) {
-        error = e;
+    newObj = Intl.Collator.call(obj);
+    if (obj === newObj) {
+      $ERROR("Collator object created with \"new\" was not ignored as this-value.");
     }
-    if (error === undefined) {
-        $ERROR("Re-initializing object created with \"new\" as Collator was not rejected.");
-    } else if (error.name !== "TypeError") {
-        $ERROR("Re-initializing object created with \"new\" as Collator was rejected with wrong error " + error.name + ".");
-    }
-    
+
     // variant 2: use constructor as a function
-    obj = Constructor.call({});
-    error = undefined;
-    try {
-        Intl.Collator.call(obj);
-    } catch (e) {
-        error = e;
+    obj = Constructor();
+    newObj = Intl.Collator.call(obj);
+    if (obj === newObj) {
+      $ERROR("Collator object created with constructor as function was not ignored as this-value.");
     }
-    if (error === undefined) {
-        $ERROR("Re-initializing object created with constructor as function as Collator was not rejected.");
-    } else if (error.name !== "TypeError") {
-        $ERROR("Re-initializing object created with constructor as function as Collator was rejected with wrong error " + error.name + ".");
-    }
-    
+
     return true;
 });
diff --git a/test/intl402/10.1.2.1_4.js b/test/intl402/10.1.2.1_4.js
index 9a1769434b..dc30d0a03e 100644
--- a/test/intl402/10.1.2.1_4.js
+++ b/test/intl402/10.1.2.1_4.js
@@ -4,8 +4,8 @@
 /*---
 es5id: 10.1.2.1_4
 description: >
-    Tests that for non-object values passed as this to Collator a
-    wrapper object will be initialized and returned.
+    Tests that non-object values passed as this to Collator are ignored
+    and a normal collator object will be initialized and returned.
 author: Norbert Lindenberg
 ---*/
 
diff --git a/test/intl402/11.1.1_1.js b/test/intl402/11.1.1_1.js
index e31ddb9e07..6e36af019b 100644
--- a/test/intl402/11.1.1_1.js
+++ b/test/intl402/11.1.1_1.js
@@ -3,40 +3,27 @@
 
 /*---
 es5id: 11.1.1_1
-description: Tests that an object can't be re-initialized as a NumberFormat.
+description: Tests that the this-value is ignored in NumberFormat.
 author: Norbert Lindenberg
 includes: [testIntl.js]
 ---*/
 
 testWithIntlConstructors(function (Constructor) {
-    var obj, error;
-    
+    var obj, newObj;
+
     // variant 1: use constructor in a "new" expression
     obj = new Constructor();
-    try {
-        Intl.NumberFormat.call(obj);
-    } catch (e) {
-        error = e;
+    newObj = Intl.NumberFormat.call(obj);
+    if (obj === newObj) {
+      $ERROR("NumberFormat object created with \"new\" was not ignored as this-value.");
     }
-    if (error === undefined) {
-        $ERROR("Re-initializing object created with \"new\" as NumberFormat was not rejected.");
-    } else if (error.name !== "TypeError") {
-        $ERROR("Re-initializing object created with \"new\" as NumberFormat was rejected with wrong error " + error.name + ".");
-    }
-    
+
     // variant 2: use constructor as a function
-    obj = Constructor.call({});
-    error = undefined;
-    try {
-        Intl.NumberFormat.call(obj);
-    } catch (e) {
-        error = e;
+    obj = Constructor();
+    newObj = Intl.NumberFormat.call(obj);
+    if (obj === newObj) {
+      $ERROR("NumberFormat object created with constructor as function was not ignored as this-value.");
     }
-    if (error === undefined) {
-        $ERROR("Re-initializing object created with constructor as function as NumberFormat was not rejected.");
-    } else if (error.name !== "TypeError") {
-        $ERROR("Re-initializing object created with constructor as function as NumberFormat was rejected with wrong error " + error.name + ".");
-    }
-    
+
     return true;
 });
diff --git a/test/intl402/11.1.2.1_4.js b/test/intl402/11.1.2.1_4.js
index e21140147e..3cff14d805 100644
--- a/test/intl402/11.1.2.1_4.js
+++ b/test/intl402/11.1.2.1_4.js
@@ -4,8 +4,8 @@
 /*---
 es5id: 11.1.2.1_4
 description: >
-    Tests that for non-object values passed as this to NumberFormat a
-    wrapper object will be initialized and returned.
+    Tests that non-object values passed as this to NumberFormat are ignored
+    and a normal number format object will be initialized and returned.
 author: Norbert Lindenberg
 ---*/
 
diff --git a/test/intl402/12.1.1_1.js b/test/intl402/12.1.1_1.js
index 2e01c2fb35..5a042454a2 100644
--- a/test/intl402/12.1.1_1.js
+++ b/test/intl402/12.1.1_1.js
@@ -3,40 +3,27 @@
 
 /*---
 es5id: 12.1.1_1
-description: Tests that an object can't be re-initialized as a DateTimeFormat.
+description: Tests that the this-value is ignored in DateTimeFormat.
 author: Norbert Lindenberg
 includes: [testIntl.js]
 ---*/
 
 testWithIntlConstructors(function (Constructor) {
-    var obj, error;
-    
+    var obj, newObj;
+
     // variant 1: use constructor in a "new" expression
     obj = new Constructor();
-    try {
-        Intl.DateTimeFormat.call(obj);
-    } catch (e) {
-        error = e;
+    newObj = Intl.DateTimeFormat.call(obj);
+    if (obj === newObj) {
+      $ERROR("DateTimeFormat object created with \"new\" was not ignored as this-value.");
     }
-    if (error === undefined) {
-        $ERROR("Re-initializing object created with \"new\" as DateTimeFormat was not rejected.");
-    } else if (error.name !== "TypeError") {
-        $ERROR("Re-initializing object created with \"new\" as DateTimeFormat was rejected with wrong error " + error.name + ".");
-    }
-    
+
     // variant 2: use constructor as a function
-    obj = Constructor.call({});
-    error = undefined;
-    try {
-        Intl.DateTimeFormat.call(obj);
-    } catch (e) {
-        error = e;
+    obj = Constructor();
+    newObj = Intl.DateTimeFormat.call(obj);
+    if (obj === newObj) {
+      $ERROR("DateTimeFormat object created with constructor as function was not ignored as this-value.");
     }
-    if (error === undefined) {
-        $ERROR("Re-initializing object created with constructor as function as DateTimeFormat was not rejected.");
-    } else if (error.name !== "TypeError") {
-        $ERROR("Re-initializing object created with constructor as function as DateTimeFormat was rejected with wrong error " + error.name + ".");
-    }
-    
+
     return true;
 });
diff --git a/test/intl402/12.1.2.1_4.js b/test/intl402/12.1.2.1_4.js
index 5806f89ac4..8ba9f33520 100644
--- a/test/intl402/12.1.2.1_4.js
+++ b/test/intl402/12.1.2.1_4.js
@@ -4,8 +4,8 @@
 /*---
 es5id: 12.1.2.1_4
 description: >
-    Tests that for non-object values passed as this to DateTimeFormat
-    a  wrapper object will be initialized and returned.
+    Tests that non-object values passed as this to DateTimeFormat are ignored
+    and a normal date-time format object will be initialized and returned.
 author: Norbert Lindenberg
 ---*/
 

From 438b87b5b649314e7247c305b5870ed69916bb53 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Bargull?= <andre.bargull@gmail.com>
Date: Wed, 8 Jul 2015 19:13:31 +0200
Subject: [PATCH 3/4] Intl sub-classing is now restricted to class syntax.

---
 test/intl402/10.1.2_a.js | 11 +++++------
 test/intl402/11.1.2.js   | 11 +++++------
 test/intl402/12.1.2.js   | 11 +++++------
 3 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/test/intl402/10.1.2_a.js b/test/intl402/10.1.2_a.js
index 285cc7b6d5..83bd66b464 100644
--- a/test/intl402/10.1.2_a.js
+++ b/test/intl402/10.1.2_a.js
@@ -15,15 +15,14 @@ var a = ["A", "C", "E", "B", "D", "F"];
 var referenceCollator = new Intl.Collator(locales);
 var referenceSorted = a.slice().sort(referenceCollator.compare);
 
-function MyCollator(locales, options) {
-    Intl.Collator.call(this, locales, options);
+class MyCollator extends Intl.Collator {
+  constructor(locales, options) {
+    super(locales, options);
     // could initialize MyCollator properties
+  }
+  // could add methods to MyCollator.prototype
 }
 
-MyCollator.prototype = Object.create(Intl.Collator.prototype);
-MyCollator.prototype.constructor = MyCollator;
-// could add methods to MyCollator.prototype
-
 var collator = new MyCollator(locales);
 a.sort(collator.compare);
 testArraysAreSame(referenceSorted, a);
diff --git a/test/intl402/11.1.2.js b/test/intl402/11.1.2.js
index cd722b0f35..6032130c86 100644
--- a/test/intl402/11.1.2.js
+++ b/test/intl402/11.1.2.js
@@ -15,15 +15,14 @@ var a = [0, 1, -1, -123456.789, -Infinity, NaN];
 var referenceNumberFormat = new Intl.NumberFormat(locales);
 var referenceFormatted = a.map(referenceNumberFormat.format);
 
-function MyNumberFormat(locales, options) {
-    Intl.NumberFormat.call(this, locales, options);
+class MyNumberFormat extends Intl.NumberFormat {
+  constructor(locales, options) {
+    super(locales, options);
     // could initialize MyNumberFormat properties
+  }
+  // could add methods to MyNumberFormat.prototype
 }
 
-MyNumberFormat.prototype = Object.create(Intl.NumberFormat.prototype);
-MyNumberFormat.prototype.constructor = MyNumberFormat;
-// could add methods to MyNumberFormat.prototype
-
 var format = new MyNumberFormat(locales);
 var actual = a.map(format.format);
 testArraysAreSame(referenceFormatted, actual);
diff --git a/test/intl402/12.1.2.js b/test/intl402/12.1.2.js
index 6df79f5f53..5265b68fd1 100644
--- a/test/intl402/12.1.2.js
+++ b/test/intl402/12.1.2.js
@@ -15,15 +15,14 @@ var a = [new Date(0), Date.now(), new Date(Date.parse("1989-11-09T17:57:00Z"))];
 var referenceDateTimeFormat = new Intl.DateTimeFormat(locales);
 var referenceFormatted = a.map(referenceDateTimeFormat.format);
 
-function MyDateTimeFormat(locales, options) {
-    Intl.DateTimeFormat.call(this, locales, options);
+class MyDateTimeFormat extends Intl.DateTimeFormat {
+  constructor(locales, options) {
+    super(locales, options);
     // could initialize MyDateTimeFormat properties
+  }
+  // could add methods to MyDateTimeFormat.prototype
 }
 
-MyDateTimeFormat.prototype = Object.create(Intl.DateTimeFormat.prototype);
-MyDateTimeFormat.prototype.constructor = MyDateTimeFormat;
-// could add methods to MyDateTimeFormat.prototype
-
 var format = new MyDateTimeFormat(locales);
 var actual = a.map(format.format);
 testArraysAreSame(referenceFormatted, actual);

From d5075819e9ab1eabf737b2a9d0e15f7d796cdaf5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Bargull?= <andre.bargull@gmail.com>
Date: Wed, 8 Jul 2015 19:13:55 +0200
Subject: [PATCH 4/4] Check resolved time zone is valid

---
 harness/testIntl.js    | 37 +++++++++++++++++++++++++++++++++++++
 test/intl402/12.3.3.js |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/harness/testIntl.js b/harness/testIntl.js
index b009a2e9ed..465d4b3b81 100644
--- a/harness/testIntl.js
+++ b/harness/testIntl.js
@@ -1147,6 +1147,43 @@ function testValidDateTimeComponentValue(component, value) {
 }
 
 
+/**
+ * @description Tests whether timeZone is a String value representing a
+ * structurally valid and canonicalized time zone name, as defined in
+ * sections 6.4.1 and 6.4.2 of the ECMAScript Internationalization API
+ * Specification.
+ * @param {String} timeZone the string to be tested.
+ * @result {Boolean} whether the test succeeded.
+ */
+
+function isCanonicalizedStructurallyValidTimeZoneName(timeZone) {
+    /**
+     * Regular expression defining IANA Time Zone names.
+     *
+     * Spec: IANA Time Zone Database, Theory file
+     */
+    var fileNameComponent = "(?:[A-Za-z_]|\\.(?!\\.?(?:/|$)))[A-Za-z.\\-_]{0,13}";
+    var fileName = fileNameComponent + "(?:/" + fileNameComponent + ")*";
+    var etcName = "(?:Etc/)?GMT[+-]\\d{1,2}";
+    var systemVName = "SystemV/[A-Z]{3}\\d{1,2}(?:[A-Z]{3})?";
+    var legacyName = etcName + "|" + systemVName + "|CST6CDT|EST5EDT|MST7MDT|PST8PDT|NZ|Canada/East-Saskatchewan";
+    var zoneNamePattern = new RegExp("^(?:" + fileName + "|" + legacyName + ")$");
+
+    if (typeof timeZone !== "string") {
+        return false;
+    }
+    // 6.4.2 CanonicalizeTimeZoneName (timeZone), step 3
+    if (timeZone === "UTC") {
+        return true;
+    }
+    // 6.4.2 CanonicalizeTimeZoneName (timeZone), step 3
+    if (timeZone === "Etc/UTC" || timeZone === "Etc/GMT") {
+        return false;
+    }
+    return zoneNamePattern.test(timeZone);
+}
+
+
 /**
  * Verifies that the actual array matches the expected one in length, elements,
  * and element order.
diff --git a/test/intl402/12.3.3.js b/test/intl402/12.3.3.js
index 55e31ad869..46a6b38c0e 100644
--- a/test/intl402/12.3.3.js
+++ b/test/intl402/12.3.3.js
@@ -40,7 +40,7 @@ var calendars = [
 mustHaveProperty(actual, "locale", isCanonicalizedStructurallyValidLanguageTag);
 mustHaveProperty(actual, "calendar", calendars);
 mustHaveProperty(actual, "numberingSystem", isValidNumberingSystem);
-mustHaveProperty(actual, "timeZone", [undefined]);
+mustHaveProperty(actual, "timeZone", isCanonicalizedStructurallyValidTimeZoneName);
 mustNotHaveProperty(actual, "weekday");
 mustNotHaveProperty(actual, "era");
 mustHaveProperty(actual, "year", ["2-digit", "numeric"]);