From a7e6453c0e374f5d2075d6c4e52203845d34225a Mon Sep 17 00:00:00 2001
From: Mark Miller <erights@gmail.com>
Date: Mon, 27 Jun 2011 08:58:09 -0600
Subject: [PATCH] Adding new files from sputniktests r97

---
 .../S15.10.6.2_A12.js                         | 18 +++++++++++++
 .../15.12.2_JSON.parse/S15.12.2_A1.js         | 19 +++++++++++++
 .../S15.2.4.4_A14.js                          | 12 +++++++++
 .../S15.3.4.2_A12.js                          | 13 +++++++++
 .../S15.3.4.2_A13.js                          | 13 +++++++++
 .../S15.3.4.2_A14.js                          | 13 +++++++++
 .../S15.3.4.2_A15.js                          | 16 +++++++++++
 .../S15.3.4.2_A16.js                          | 18 +++++++++++++
 .../S15.3.4.3_A13.js                          | 11 ++++++++
 .../S15.3.4.3_A14.js                          | 11 ++++++++
 .../S15.3.4.3_A15.js                          | 11 ++++++++
 .../S15.3.4.3_A16.js                          | 27 +++++++++++++++++++
 .../S15.3.4.4_A13.js                          | 11 ++++++++
 .../S15.3.4.4_A14.js                          | 11 ++++++++
 .../S15.3.4.4_A15.js                          | 11 ++++++++
 .../S15.3.4.4_A16.js                          | 27 +++++++++++++++++++
 .../S15.3.4.5_A1.js                           | 15 +++++++++++
 .../S15.3.4.5_A13.js                          | 12 +++++++++
 .../S15.3.4.5_A14.js                          | 12 +++++++++
 .../S15.3.4.5_A15.js                          | 12 +++++++++
 .../S15.3.4.5_A16.js                          | 27 +++++++++++++++++++
 .../S15.3.4.5_A2.js                           | 16 +++++++++++
 .../S15.4.4.11_A8.js                          | 24 +++++++++++++++++
 .../S15.4.4.18_A1.js                          | 11 ++++++++
 .../S15.4.4.18_A2.js                          | 14 ++++++++++
 .../S15.5.4.11_A12.js                         | 23 ++++++++++++++++
 26 files changed, 408 insertions(+)
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.6_Properties_of_the_RegExp_Prototype_Object/15.10.6.2_RegExp.prototype.exec/S15.10.6.2_A12.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.12_The_JSON_Object/15.12.2_JSON.parse/S15.12.2_A1.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A14.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A12.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A13.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A14.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A15.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A16.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A13.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A14.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A15.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A16.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A13.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A14.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A15.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A16.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A1.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A13.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A14.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A15.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A16.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A2.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.11_Array_prototype_sort/S15.4.4.11_A8.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A1.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A2.js
 create mode 100644 external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.11_String.prototype.replace/S15.5.4.11_A12.js

diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.6_Properties_of_the_RegExp_Prototype_Object/15.10.6.2_RegExp.prototype.exec/S15.10.6.2_A12.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.6_Properties_of_the_RegExp_Prototype_Object/15.10.6.2_RegExp.prototype.exec/S15.10.6.2_A12.js
new file mode 100644
index 0000000000..111aedb391
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.6_Properties_of_the_RegExp_Prototype_Object/15.10.6.2_RegExp.prototype.exec/S15.10.6.2_A12.js
@@ -0,0 +1,18 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.10.6.2_A12;
+* @section: 15.10.6.2;
+* @assertion: regExp exec() acts like regExp.exec('undefined') (step 2);
+* @description: Checking RegExp.prototype.exec.length;
+*/
+
+(/foo/).test('xfoox');
+var match = new RegExp('(.|\r|\n)*','').exec()[0];
+if (match === 'xfoox') {
+  $FAIL('#1: regExp.exec() leaks match globally');
+}
+if (match !== 'undefined') {
+  $FAIL('#2: regExp.exec() must coerce absent first arg to "undefined"');
+}
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.12_The_JSON_Object/15.12.2_JSON.parse/S15.12.2_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.12_The_JSON_Object/15.12.2_JSON.parse/S15.12.2_A1.js
new file mode 100644
index 0000000000..a7b1408102
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.12_The_JSON_Object/15.12.2_JSON.parse/S15.12.2_A1.js
@@ -0,0 +1,19 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @name: S15.12.2_A1;
+ * @section: 15.12.2;
+ * @assertion: JSON.parse must create a property with the given
+ *             property name;
+ * @description: Tests that JSON.parse treats "__proto__" as a regular
+ *               property name;
+ */
+
+var x = JSON.parse('{"__proto__":[]}');
+if (Object.getPrototypeOf(x) !== Object.prototype) {
+  $FAIL('#1: JSON.parse confused by "__proto__"');
+}
+if (!Array.isArray(x.__proto__)) {
+  $FAIL('#2: JSON.parse did not set "__proto__" as a regular property');
+}
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A14.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A14.js
new file mode 100644
index 0000000000..268ae9e879
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.2_Object_Objects/15.2.4_Properties_of_the_Object_Prototype_Object/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A14.js
@@ -0,0 +1,12 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.2.4.4_A14;
+* @section: 15.2.4.4;
+* @assertion: Let O be the result of calling ToObject passing the this
+*             value as the argument.
+* @negative
+*/
+
+(1,Object.prototype.valueOf)();
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A12.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A12.js
new file mode 100644
index 0000000000..6c26bd6a86
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A12.js
@@ -0,0 +1,13 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.2_A12;
+* @section: 15.3.4.2;
+* @assertion: The Function.prototype.toString function is not generic;
+*             it throws a TypeError exception if its this value is not
+*             a Function object.
+* @negative TypeError;
+*/
+
+Function.prototype.toString.call(undefined);
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A13.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A13.js
new file mode 100644
index 0000000000..32a3913021
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A13.js
@@ -0,0 +1,13 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.2_A13;
+* @section: 15.3.4.2;
+* @assertion: The toString function is not generic; it throws a
+*             TypeError exception if its this value is not a Function
+*             object.
+* @negative TypeError;
+*/
+
+Function.prototype.toString.call(null);
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A14.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A14.js
new file mode 100644
index 0000000000..8ff48e6de5
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A14.js
@@ -0,0 +1,13 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.2_A14;
+* @section: 15.3.4.2;
+* @assertion: The toString function is not generic; it throws a
+*             TypeError exception if its this value is not a Function
+*             object.
+* @negative TypeError;
+*/
+
+Function.prototype.toString.call({});
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A15.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A15.js
new file mode 100644
index 0000000000..4dbd359284
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A15.js
@@ -0,0 +1,16 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.2_A15;
+* @section: 15.3.4.2;
+* @assertion: The toString function is not generic; it throws a
+*             TypeError exception if its this value is not a Function
+*             object.
+* @description: Whether or not they are callable, RegExp objects are
+*               not Function objects, so toString should throw a
+*               TypeError.
+* @negative TypeError;
+*/
+
+Function.prototype.toString.call(/x/);
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A16.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A16.js
new file mode 100644
index 0000000000..6a51b0ceee
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.2_Function.prototype.toString/S15.3.4.2_A16.js
@@ -0,0 +1,18 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.2_A16;
+* @section: 15.3.4.2;
+* @assertion: The toString function is not generic; it throws a
+*             TypeError exception if its this value is not a Function
+*             object.
+* @description: The String constructor, given an object, should invoke
+*               that object's toString method as a method, i.e., with
+*               its this value bound to that object.
+* @negative TypeError;
+*/
+
+var obj = {toString: Function.prototype.toString};
+
+String(obj);
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A13.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A13.js
new file mode 100644
index 0000000000..01196f9a0c
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A13.js
@@ -0,0 +1,11 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.3_A13;
+* @section: 15.3.4.3;
+* @assertion: If IsCallable(func) is false, then throw a TypeError exception.
+* @negative TypeError;
+*/
+
+Function.prototype.apply.call(undefined, {}, []);
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A14.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A14.js
new file mode 100644
index 0000000000..c756e4c41b
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A14.js
@@ -0,0 +1,11 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.3_A14;
+* @section: 15.3.4.3;
+* @assertion: If IsCallable(func) is false, then throw a TypeError exception.
+* @negative TypeError;
+*/
+
+Function.prototype.apply.call(null, {}, []);
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A15.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A15.js
new file mode 100644
index 0000000000..339d446898
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A15.js
@@ -0,0 +1,11 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.3_A15;
+* @section: 15.3.4.3;
+* @assertion: If IsCallable(func) is false, then throw a TypeError exception.
+* @negative TypeError;
+*/
+
+Function.prototype.apply.call({}, {}, []);
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A16.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A16.js
new file mode 100644
index 0000000000..08425ed709
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.3_Function.prototype.apply/S15.3.4.3_A16.js
@@ -0,0 +1,27 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.3_A16;
+* @section: 15.3.4.3;
+* @assertion: If IsCallable(func) is false, then throw a TypeError exception.
+* @description: A RegExp is not a function, but it may be
+*               callable. Iff it is, it's typeof should be 'function',
+*               in which case apply should accept it as a valid this
+*               value.
+*/
+
+var re = (/x/);
+if (typeof re === 'function') {
+  Function.prototype.apply.call(re, undefined, ['x']);
+} else {
+  try {
+    Function.prototype.bind.call(re, undefined);
+    $FAIL('#1: If IsCallable(func) is false, ' +
+          'then (bind should) throw a TypeError exception');
+  } catch (e) {
+    if (!(e instanceof TypeError)) {
+      $ERROR('#1: TypeError expected. Actual: ' + e);
+    }
+  }
+}
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A13.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A13.js
new file mode 100644
index 0000000000..6dcf1f9607
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A13.js
@@ -0,0 +1,11 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.4_A13;
+* @section: 15.3.4.4;
+* @assertion: If IsCallable(func) is false, then throw a TypeError exception.
+* @negative TypeError;
+*/
+
+Function.prototype.call.call(undefined, {});
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A14.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A14.js
new file mode 100644
index 0000000000..88a8ae002d
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A14.js
@@ -0,0 +1,11 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.4_A14;
+* @section: 15.3.4.4;
+* @assertion: If IsCallable(func) is false, then throw a TypeError exception.
+* @negative TypeError;
+*/
+
+Function.prototype.call.call(null, {});
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A15.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A15.js
new file mode 100644
index 0000000000..d337793eb4
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A15.js
@@ -0,0 +1,11 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.4_A15;
+* @section: 15.3.4.4;
+* @assertion: If IsCallable(func) is false, then throw a TypeError exception.
+* @negative TypeError;
+*/
+
+Function.prototype.call.call({}, {});
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A16.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A16.js
new file mode 100644
index 0000000000..2333f4ec4a
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.4_Function.prototype.call/S15.3.4.4_A16.js
@@ -0,0 +1,27 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.4_A16;
+* @section: 15.3.4.4;
+* @assertion: If IsCallable(func) is false, then throw a TypeError exception.
+* @description: A RegExp is not a function, but it may be
+*               callable. Iff it is, it's typeof should be 'function',
+*               in which case call should accept it as a valid this
+*               value.
+*/
+
+var re = (/x/);
+if (typeof re === 'function') {
+  Function.prototype.call.call(re, undefined, 'x');
+} else {
+  try {
+    Function.prototype.bind.call(re, undefined);
+    $FAIL('#1: If IsCallable(func) is false, ' +
+          'then (bind should) throw a TypeError exception');
+  } catch (e) {
+    if (!(e instanceof TypeError)) {
+      $ERROR('#1: TypeError expected. Actual: ' + e);
+    }
+  }
+}
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A1.js
new file mode 100644
index 0000000000..c58334ba2a
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A1.js
@@ -0,0 +1,15 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.5_A1;
+* @section: 15.3.4.5;
+* @assertion: "caller" of bound function is poisoned (step 20);
+* @description A bound function should fail to find its "caller";
+* @negative TypeError;
+*/
+
+function foo() { return bar.caller; }
+var bar = foo.bind({});
+function baz() { return bar(); }
+baz();
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A13.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A13.js
new file mode 100644
index 0000000000..9b677d8cd8
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A13.js
@@ -0,0 +1,12 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.5_A13;
+* @section: 15.3.4.5;
+* @assertion: If IsCallable(func) is false, then throw a TypeError exception.
+* @negative TypeError;
+*/
+
+Function.prototype.bind.call(undefined, {});
+
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A14.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A14.js
new file mode 100644
index 0000000000..f3b209f24b
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A14.js
@@ -0,0 +1,12 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.5_A14;
+* @section: 15.3.4.5;
+* @assertion: If IsCallable(func) is false, then throw a TypeError exception.
+* @negative TypeError;
+*/
+
+Function.prototype.bind.call(null, {});
+
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A15.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A15.js
new file mode 100644
index 0000000000..281983a643
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A15.js
@@ -0,0 +1,12 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.5_A15;
+* @section: 15.3.4.5;
+* @assertion: If IsCallable(func) is false, then throw a TypeError exception.
+* @negative TypeError;
+*/
+
+Function.prototype.bind.call({}, {});
+
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A16.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A16.js
new file mode 100644
index 0000000000..c0d57b81ac
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A16.js
@@ -0,0 +1,27 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.5_A16;
+* @section: 15.3.4.5;
+* @assertion: If IsCallable(func) is false, then throw a TypeError exception.
+* @description: A RegExp is not a function, but it may be
+*               callable. Iff it is, it's typeof should be 'function',
+*               in which case bind should accept it as a valid this
+*               value.
+*/
+
+var re = (/x/);
+if (typeof re === 'function') {
+  Function.prototype.bind.call(re, undefined);
+} else {
+  try {
+    Function.prototype.bind.call(re, undefined);
+    $FAIL('#1: If IsCallable(func) is false, ' +
+          'then (bind should) throw a TypeError exception');
+  } catch (e) {
+    if (!(e instanceof TypeError)) {
+      $ERROR('#1: TypeError expected. Actual: ' + e);
+    }
+  }
+}
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A2.js
new file mode 100644
index 0000000000..08e3489a5d
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.3_Function_Objects/15.3.4_Properties_of_the_Function_Prototype_Object/15.3.4.5_Function.prototype.bind/S15.3.4.5_A2.js
@@ -0,0 +1,16 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.3.4.5_A1;
+* @section: 15.3.4.5;
+* @assertion: "arguments" of bound function is poisoned (step 21);
+* @description a bound function should fail to find the bound function
+*              "arguments";
+* @negative TypeError;
+*/
+
+function foo() { return bar.arguments; }
+var bar = foo.bind({});
+function baz() { return bar(); }
+baz();
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.11_Array_prototype_sort/S15.4.4.11_A8.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.11_Array_prototype_sort/S15.4.4.11_A8.js
new file mode 100644
index 0000000000..b32842a7b9
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.11_Array_prototype_sort/S15.4.4.11_A8.js
@@ -0,0 +1,24 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.4.4.11_A8;
+* @section: 15.4.4.11;
+* @assertion: Call the comparefn passing undefined as the this value
+*             (step 13b);
+* @description: comparefn tests that its this value is undefined;
+*/
+
+var global = this;
+[2,3].sort(function(x,y) {
+  "use strict";
+
+  if (this === global) {
+    $FAIL('#1: Sort leaks global');
+  }
+  if (this !== undefined) {
+    $FAIL('#2: Sort comparefn should be called with this===undefined. ' +
+          'Actual: ' + this);
+  }
+  return x - y;
+});
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A1.js
new file mode 100644
index 0000000000..8497a0cdcb
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A1.js
@@ -0,0 +1,11 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @name: S15.4.4.18_A1;
+ * @section: 15.4.4.18;
+ * @assertion: array.forEach can be frozen while in progress
+ * @description: Freezes array.forEach during a forEach to see if it works
+*/
+
+['z'].forEach(function(){ Object.freeze(Array.prototype.forEach); });
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A2.js
new file mode 100644
index 0000000000..e22dc1fbf7
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.18_Array_prototype_forEach/S15.4.4.18_A2.js
@@ -0,0 +1,14 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @name: S15.4.4.18_A2;
+ * @section: 15.4.4.18;
+ * @assertion: array.forEach can be frozen while in progress
+ * @description: Freezes array.forEach during a forEach to see if it works
+*/
+
+function foo() {
+  ['z'].forEach(function(){ Object.freeze(Array.prototype.forEach); });
+}
+foo();
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.11_String.prototype.replace/S15.5.4.11_A12.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.11_String.prototype.replace/S15.5.4.11_A12.js
new file mode 100644
index 0000000000..bfc32db705
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.11_String.prototype.replace/S15.5.4.11_A12.js
@@ -0,0 +1,23 @@
+// Copyright 2011 the Sputnik authors.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.5.4.11_A12;
+* @section: 15.5.4.11;
+* @assertion: Call replaceValue passing undefined as the this value;
+* @description: replaceValue tests that its this value is undefined;
+*/
+
+var global = this;
+'x'.replace(/x/, function() {
+  "use strict";
+
+  if (this === global) {
+    $FAIL('#1: String replace leaks global');
+  }
+  if (this !== undefined) {
+    $FAIL('#2: replaceValue should be called with this===undefined. ' +
+          'Actual: ' + this);
+  }
+  return 'y';
+});
-- 
GitLab