From: arv Date: Tue, 18 Nov 2014 19:00:08 +0000 (-0800) Subject: Classes: Expand test to cover strict runtime behavior X-Git-Tag: upstream/4.7.83~5633 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5d15253b8b010b61f78b6d77ac3357554fd7a19;p=platform%2Fupstream%2Fv8.git Classes: Expand test to cover strict runtime behavior This tests that the extends expression is treated as strict at runtime and not just at parse time. BUG=v8:3330 LOG=Y R=dslomov@chromium.org Review URL: https://codereview.chromium.org/729323003 Cr-Commit-Position: refs/heads/master@{#25407} --- diff --git a/test/mjsunit/harmony/classes.js b/test/mjsunit/harmony/classes.js index 4efdaa1..c8c25ff 100644 --- a/test/mjsunit/harmony/classes.js +++ b/test/mjsunit/harmony/classes.js @@ -159,6 +159,15 @@ assertThrows('class C extends function B() { with ({}); return B; }() {}', SyntaxError); + var D = class extends function() { + arguments.caller; + } {}; + assertThrows(function() { + Object.getPrototypeOf(D).arguments; + }, TypeError); + assertThrows(function() { + new D; + }, TypeError); })();