1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/jaeger/testPropCallElem2.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,20 @@ 1.4 +// vim: set ts=8 sts=4 et sw=4 tw=99: 1.5 + 1.6 +function testUKeyUObject(a, key1, key2, key3) { 1.7 + a.a = function () { return this.d; } 1.8 + a.b = function () { return this.e; } 1.9 + a.c = function() { return this.f; } 1.10 + a.d = 20; 1.11 + a.e = "hi"; 1.12 + a.f = 500; 1.13 + delete a["b"]; 1.14 + Object.defineProperty(a, "b", { get: function () { return function () { return this.e; } } }); 1.15 + assertEq(a[key1](), 20); 1.16 + assertEq(a[key2](), "hi"); 1.17 + assertEq(a[key3](), 500); 1.18 +} 1.19 + 1.20 +for (var i = 0; i < 5; i++) 1.21 + testUKeyUObject({}, "a", "b", "c"); 1.22 + 1.23 +