Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8054503

test/script/external/test262/test/suite/ch12/12.6/12.6.4/12.6.4-2.js fails with tip

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • None
    • core-libs
    • None
    • b28
    • generic
    • generic

        I cloned test262 es5-tests branch under test/script/external and ran "ant clean test262parallel".

        test/script/external/test262/test/suite/ch12/12.6/12.6.4/12.6.4-2.js fails with tip.

        Copying the test content here for quick reference:

        /**
         * @path ch12/12.6/12.6.4/12.6.4-2.js
         * @description The for-in Statement - the values of [[Enumerable]] attributes are not considered when determining if a property of a prototype object is shadowed by a previous object on the prototype chain
         */


        function testcase() {
                var proto = {
                    prop: "enumerableValue"
                };

                var ConstructFun = function () { };
                ConstructFun.prototype = proto;

                var child = new ConstructFun();

                Object.defineProperty(child, "prop", {
                    value: "nonEnumerableValue",
                    enumerable: false
                });

                var accessedProp = false;

                for (var p in child) {
                    if (p === "prop") {
                        accessedProp = true;
                    }
                }
                return !accessedProp;
            }
        runTestCase(testcase);

              sundar Sundararajan Athijegannathan
              sundar Sundararajan Athijegannathan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: