diff options
author | David Fugate <dfugate@microsoft.com> | 2011-10-03 12:20:26 -0700 |
---|---|---|
committer | David Fugate <dfugate@microsoft.com> | 2011-10-03 12:20:26 -0700 |
commit | 69a1080bb68f1b28abd72e33b730f790bbb69aae (patch) | |
tree | 7cceccd22522fa9ceacd8f8b0ab510567f5c7c27 /test/suite/ch10/10.6/S10.6_A5_T4.js | |
parent | 6c9436f9775c83ad2ac18dfdab36d2a3aceff24e (diff) |
Renamed Sputnik directories.
Diffstat (limited to 'test/suite/ch10/10.6/S10.6_A5_T4.js')
-rw-r--r-- | test/suite/ch10/10.6/S10.6_A5_T4.js | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/test/suite/ch10/10.6/S10.6_A5_T4.js b/test/suite/ch10/10.6/S10.6_A5_T4.js new file mode 100644 index 000000000..1e1eec6d4 --- /dev/null +++ b/test/suite/ch10/10.6/S10.6_A5_T4.js @@ -0,0 +1,41 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * A property is created with name length with property + * attributes { DontEnum } and no others + * + * @path 10_Execution_Contexts/10.6_Arguments_Object/S10.1.8_A5_T4.js + * @description Overriding arguments.length property + */ + +var str = "something different"; +//CHECK#1 +function f1(){ + arguments.length = str; + return arguments; +} + +try{ + if(f1().length !== str){ + $ERROR("#1: A property length have attribute { ReadOnly }"); + } +} +catch(e){ + $ERROR("#1: arguments object don't exists"); +} + +//CHECK#2 +var f2 = function(){ + arguments.length = str; + return arguments; + }; +try{ + if(f2().length !== str){ + $ERROR("#2: A property length have attribute { ReadOnly }"); + } +} +catch(e){ + $ERROR("#2: arguments object don't exists"); +} + |