From 6a806c8b7fe924e442623c6df7a1f9b32d28ab4d Mon Sep 17 00:00:00 2001 From: David Fugate Date: Tue, 1 Mar 2011 11:08:16 -0800 Subject: [PATCH] Three test cases fixes. One of these involved re-enabling 15.2.3.3-4-188.js. --- test/config/excludelist.xml | 1 - .../chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188.js | 9 ++------- .../chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.js | 9 ++++----- .../chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.js | 8 ++++---- website/resources/scripts/testcases/chapter15.xml | 7 ++++--- website/resources/scripts/testcases/testcaseslist.xml | 2 +- 6 files changed, 15 insertions(+), 21 deletions(-) diff --git a/test/config/excludelist.xml b/test/config/excludelist.xml index 9524f29c6c..fc4cf5cad7 100644 --- a/test/config/excludelist.xml +++ b/test/config/excludelist.xml @@ -306,7 +306,6 @@ https://bugs.ecmascript.org/show_bug.cgi?id=14 https://bugs.ecmascript.org/show_bug.cgi?id=15 https://bugs.ecmascript.org/show_bug.cgi?id=15 - https://bugs.ecmascript.org/show_bug.cgi?id=16 https://bugs.ecmascript.org/show_bug.cgi?id=18 diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188.js index 798f8f1cf7..c06620f6c3 100644 --- a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188.js +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188.js @@ -28,13 +28,8 @@ description: "Object.getOwnPropertyDescriptor returns undefined for non-existent test: function testcase() { var f = Function('return 42;'); - - var desc = Object.getOwnPropertyDescriptor(f, "name"); - - if (desc === undefined) { - return true; - } - return false; + var desc = Object.getOwnPropertyDescriptor(f, "functionNameHopefullyDoesNotExist"); + return desc === undefined; }, precondition: function prereq() { diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.js index 9bdd9535f8..bc0a85c227 100644 --- a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.js +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.js @@ -31,10 +31,9 @@ ES5Harness.registerTest({ var props = new Error("test"); var result = false; - props.description = { value: 11 }; - props.message = { value: 11 }; - props.name = { value: 11 }; - + (Object.getOwnPropertyNames(props)).forEach(function(name){ + props[name] = {value:11, configurable:true} + }); Object.defineProperty(props, "prop", { get: function () { @@ -48,6 +47,6 @@ ES5Harness.registerTest({ }, precondition: function prereq() { - return fnExists(Object.create) && fnExists(Object.defineProperty); + return fnExists(Object.create) && fnExists(Object.defineProperty) && fnExists(Array.prototype.forEach) && fnExists(Object.getOwnPropertyNames); } }); diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.js index ab01ae6916..54d2fda6e9 100644 --- a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.js +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.js @@ -29,9 +29,9 @@ ES5Harness.registerTest({ var props = new Error("test"); - props.description = { value: 11 }; - props.message = { value: 11 }; - props.name = { value: 11 }; + (Object.getOwnPropertyNames(props)).forEach(function(name){ + props[name] = {value:11, configurable:true} + }); props.prop = { value: 12, @@ -42,6 +42,6 @@ ES5Harness.registerTest({ }, precondition: function prereq() { - return fnExists(Object.create); + return fnExists(Object.create) && fnExists(Array.prototype.forEach) && fnExists(Object.getOwnPropertyNames); } }); diff --git a/website/resources/scripts/testcases/chapter15.xml b/website/resources/scripts/testcases/chapter15.xml index 696cb3f66a..fec48eedec 100644 --- a/website/resources/scripts/testcases/chapter15.xml +++ b/website/resources/scripts/testcases/chapter15.xml @@ -2,7 +2,7 @@ -
+
@@ -427,6 +427,7 @@ + @@ -664,7 +665,7 @@ - + @@ -857,7 +858,7 @@ - + diff --git a/website/resources/scripts/testcases/testcaseslist.xml b/website/resources/scripts/testcases/testcaseslist.xml index ea5a8d8a1b..bbe9f8804e 100644 --- a/website/resources/scripts/testcases/testcaseslist.xml +++ b/website/resources/scripts/testcases/testcaseslist.xml @@ -1,4 +1,4 @@ - + resources/scripts/testcases/07_Lexical_Conventions.xml resources/scripts/testcases/08_Types.xml resources/scripts/testcases/09_Type_Conversion.xml